Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ftrace

From Wikipedia, the free encyclopedia
Tracing utility for Linux kernel

ftrace
DevelopersSteven Rostedt and others
Initial releaseOctober 9, 2008; 17 years ago (2008-10-09)
Operating systemLinux
TypeKernel extension
LicenseGNU GPL version 2[1]
Websitewww.kernel.org/doc/html/latest/trace/index.html

ftrace (Function Tracer) is atracingframework for theLinux kernel. Although its original name, Function Tracer, came from ftrace's ability to record information related to variousfunction calls performed while thekernel is running, ftrace's tracing capabilities cover a much broader range of kernel's internal operations.[2][3]

Details

[edit]

With its various tracer plugins, ftrace can be targeted at different statictracepoints, such asscheduling events,interrupts,memory-mapped I/O,CPU power state transitions, and operations related tofile systems andvirtualization. Also, dynamic tracking of kernel function calls is available, optionally restrictable to a subset offunctions by usingglobs, and with the possibility to generatecall graphs and providestack usage reports. At the same time, ftrace can be used to measure variouslatencies within the Linux kernel, such as for how long interrupts orpreemption are disabled.[2][4][5]: 3–11, 14, 18 

An ftrace-enabled Linux kernel is built by enabling theCONFIG_FUNCTION_TRACERkernel configuration option. The entire runtime interaction with ftrace is performed through readable and writablevirtual files contained in a specifically mounteddebugfs file system; as a result, ftrace requires no specializeduserspace utilities to operate.[2][3][6] However, there are additional userspace utilities that provide more advanced features for data recording, analysis and visualization; examples of such utilities aretrace-cmd andKernelShark.[2][5]: 31–47 [7][8]

Internally, ftrace relies on thegcc'sprofiling mechanism to prependmachine instructions to thecompiled versions of allsource-level kernel functions, which redirect the execution of functions to the ftrace'strampolines and tracer plugins that perform the actual tracing. These "entry point" instructions created by gcc are altered by ftrace when the kernel isbooted, and varied later at runtime by ftrace betweenNOPs and actualjumps to the tracing trampolines, depending on the tracing types and options configured at runtime.[9][10]

ftrace is developed primarily by Steven Rostedt, and it was merged into theLinux kernel mainline in kernel version 2.6.27, which was released on October 9, 2008.[11]

See also

[edit]
  • DTrace – a tracing framework for troubleshooting kernel and application problems, originally developed for Solaris
  • ktrace – a BSD Unix and Mac OS X utility that traces kernel–program interactions
  • ltrace – a Linux debugging utility, displays the calls a userland application makes to shared libraries
  • strace – a debugging utility for Linux and some other Unix-like systems, monitors system calls used by a program and all received signals
  • SystemTap – a scripting language and utility used for instrumenting Linux systems

References

[edit]
  1. ^"Linux kernel source: kernel/COPYING file".kernel.org. March 13, 1994. RetrievedJune 11, 2016.
  2. ^abcdJake Edge (March 13, 2009)."A look at ftrace".LWN.net. RetrievedJuly 23, 2014.
  3. ^abSteven Rostedt (June 16, 2014)."Linux kernel documentation: Documentation/trace/ftrace.txt".kernel.org. RetrievedJuly 23, 2014.
  4. ^"Red Hat Enterprise MRG 2 documentation, Section 3.8. Using the ftrace utility for tracing latencies".Red Hat. May 23, 2014. RetrievedJuly 24, 2014.
  5. ^abSteven Rostedt (October 18, 2010)."Ftrace: Linux Kernel Tracing"(PDF).linuxfoundation.org. Archived fromthe original(PDF) on March 8, 2013. RetrievedJuly 23, 2014.
  6. ^"Red Hat Enterprise Linux 6 documentation, Section 6.5. ftrace".Red Hat. March 14, 2014. RetrievedJuly 23, 2014.
  7. ^Steven Rostedt (October 20, 2010)."trace-cmd: A front-end for Ftrace".LWN.net. RetrievedJanuary 19, 2015.
  8. ^Steven Rostedt (February 2, 2011)."Using KernelShark to analyze the real-time scheduler".LWN.net. RetrievedJune 11, 2016.
  9. ^Steven Rostedt (January 5, 2015)."Ftrace Kernel Hooks: More than just tracing"(PDF).linuxplumbersconf.org. pp. 6–12, 24, 34,56–58. RetrievedJune 11, 2016.
  10. ^Tim Bird (November 1, 2012)."Measuring Function Duration with Ftrace"(PDF).elinux.org. pp. 5–6,12–14. RetrievedJune 11, 2016.
  11. ^"Linux kernel 2.6.27, Section 1.7. ftrace, sysprof support".kernelnewbies.org. October 9, 2008. RetrievedJuly 23, 2014.

External links

[edit]
Organization
Kernel
Support
People
Technical
Debugging
Startup
ABIs
APIs
Kernel
System Call
Interface
In-kernel
Userspace
Daemons,
File systems
Wrapper
libraries
Components
Variants
Virtualization
Adoption
Range
of use
Adopters
General
Variants
Kernel
Architectures
Components
Process management
Concepts
Scheduling
algorithms
Memory management,
resource protection
Storage access,
file systems
Supporting concepts
Retrieved from "https://en.wikipedia.org/w/index.php?title=Ftrace&oldid=1329879139"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp