ftrace

ftrace (abbreviated from Function Tracer) is a tracing framework for the Linux kernel. Although its original name, Function Tracer, came from ftrace's ability to record information related to various function calls performed while the kernel is running, ftrace's tracing capabilities cover a much broader range of kernel's internal operations.[1][2]

With its various tracer plugins, ftrace can be targeted at different static tracepoints, such as scheduling events, interrupts, memory-mapped I/O, CPU power state transitions, and operations related to file systems and virtualization. Also, dynamic tracking of kernel function calls is available, optionally restrictable to a subset of functions by using globs, and with the possibility to generate call graphs and provide stack usage. At the same time, ftrace can be used to measure various latencies within the Linux kernel, such as for how long interrupts or preemption are disabled.[1][3][4]:311,14,18

An ftrace-enabled Linux kernel is built by enabling the CONFIG_FUNCTION_TRACER kernel configuration option. The entire interaction with ftrace is performed through readable and writable virtual files contained in a specifically mounted debugfs file system; as a result, ftrace requires no specialized userspace utilities to operate.[1][2][5] However, additional userspace utilities exist to provide improved data recording, analysis and visualization features; examples of such utilities are trace-cmd and KernelShark.[1][4]:3147[6]

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

See also

References

  1. 1 2 3 4 Jake Edge (March 13, 2009). "A look at ftrace". LWN.net. Retrieved July 23, 2014.
  2. 1 2 Steven Rostedt (June 16, 2014). "Linux kernel documentation: Documentation/trace/ftrace.txt". kernel.org. Retrieved July 23, 2014.
  3. "Red Hat Enterprise MRG 2 documentation, Section 3.8. Using the ftrace utility for tracing latencies". Red Hat. May 23, 2014. Retrieved July 24, 2014.
  4. 1 2 Steven Rostedt (October 18, 2010). "Ftrace: Linux Kernel Tracing" (PDF). linuxfoundation.org. Retrieved July 23, 2014.
  5. "Red Hat Enterprise Linux 6 documentation, Section 6.5. ftrace". Red Hat. March 14, 2014. Retrieved July 23, 2014.
  6. Steven Rostedt (October 20, 2010). "trace-cmd: A front-end for Ftrace". LWN.net. Retrieved January 19, 2015.
  7. "Linux kernel 2.6.27, Section 1.7. ftrace, sysprof support". kernelnewbies.org. October 9, 2008. Retrieved July 23, 2014.

External links

Wikimedia Commons has media related to Linux kernel.
This article is issued from Wikipedia - version of the Thursday, May 14, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.