词条 | Ftrace |
释义 |
| name = ftrace | logo = | screenshot = | caption = | collapsible = | author = | developer = Steven Rostedt and others | released = {{Start date and age|2008|10|09}} | latest release version = | latest release date = | latest preview version = | latest preview date = | programming language = | operating system = Linux | platform = | size = | language = | status = | genre = Kernel extension | license = GNU GPL version 2[1] | website = {{URL|https://www.kernel.org/doc/Documentation/trace}} }}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.[2][3] 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 reports. 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.[2][4][5]{{rp|3–11,14,18}} An ftrace-enabled Linux kernel is built by enabling the {{Mono|CONFIG_FUNCTION_TRACER}} kernel configuration option. The entire runtime 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.[2][3][6] However, there are additional userspace utilities that provide more advanced features for data recording, analysis and visualization; examples of such utilities are trace-cmd and KernelShark.[2][5]{{rp|31–47}}[7][8] Internally, ftrace relies on the gcc's profiling mechanism to prepend machine instructions to the compiled versions of all source-level kernel functions, which redirect the execution of functions to the ftrace's trampolines and tracer plugins that perform the actual tracing. These "entry point" instructions created by gcc are altered by ftrace when the kernel is booted, and varied later at runtime by ftrace between NOPs and actual jumps 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 the Linux kernel mainline in kernel version 2.6.27, which was released on October 9, 2008.[11] See also{{Portal|Computer programming|Linux}}
References1. ^{{cite web | url = https://www.kernel.org/pub/linux/kernel/COPYING | title = Linux kernel source: kernel/COPYING file | date = {{date|1994-03-13|mdy}} | accessdate = {{date|2016-06-11|mdy}} | website = kernel.org}} 2. ^1 2 3 {{cite web | url = https://lwn.net/Articles/322666/ | title = A look at ftrace | date = {{date|2009-03-13|mdy}} | accessdate = {{date|2014-07-23|mdy}} | author = Jake Edge | publisher = LWN.net}} 3. ^1 {{cite web | url = https://www.kernel.org/doc/Documentation/trace/ftrace.txt | title = Linux kernel documentation: Documentation/trace/ftrace.txt | date = {{date|2014-06-16|mdy}} | accessdate = {{date|2014-07-23|mdy}} | author = Steven Rostedt | publisher = kernel.org}} 4. ^{{cite web | url = https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_MRG/2/html/Realtime_Tuning_Guide/sect-Realtime_Tuning_Guide-Realtime_Specific_Tuning-Using_the_ftrace_Utility_for_Tracing_Latencies.html | title = Red Hat Enterprise MRG 2 documentation, Section 3.8. Using the ftrace utility for tracing latencies | date = {{date|2014-05-23|mdy}} | accessdate = {{date|2014-07-24|mdy}} | publisher = Red Hat}} 5. ^1 {{cite web | url = https://events.linuxfoundation.org/slides/2010/linuxcon_japan/linuxcon_jp2010_rostedt.pdf | title = Ftrace: Linux Kernel Tracing | date = {{date|2010-10-18|mdy}} | accessdate = {{date|2014-07-23|mdy}} | author = Steven Rostedt | website = linuxfoundation.org | format = PDF}} 6. ^{{cite web | url = https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Developer_Guide/ftrace.html | title = Red Hat Enterprise Linux 6 documentation, Section 6.5. ftrace | date = {{date|2014-03-14|mdy}} | accessdate = {{date|2014-07-23|mdy}} | publisher = Red Hat}} 7. ^{{cite web | url = https://lwn.net/Articles/410200/ | title = trace-cmd: A front-end for Ftrace | date = {{date|2010-10-20|mdy}} | accessdate = {{date|2015-01-19|mdy}} | author = Steven Rostedt | publisher = LWN.net}} 8. ^{{cite web | url = https://lwn.net/Articles/425583/ | title = Using KernelShark to analyze the real-time scheduler | date = {{date|2011-02-02|mdy}} | accessdate = {{date|2016-06-11|mdy}} | author = Steven Rostedt | publisher = LWN.net}} 9. ^{{cite web | url = http://www.linuxplumbersconf.org/2014/ocw/system/presentations/1773/original/ftrace-kernel-hooks-2014.pdf | title = Ftrace Kernel Hooks: More than just tracing | date = {{date|2015-01-05|mdy}} | accessdate = {{date|2016-06-11|mdy}} | author = Steven Rostedt | website = linuxplumbersconf.org | format = PDF | pages = 6–12, 24, 34, 56–58}} 10. ^{{cite web | url = http://elinux.org/images/d/d6/Measuring-function-duration-with-ftrace.pdf | title = Measuring Function Duration with Ftrace | date = {{date|2012-11-01|mdy}} | accessdate = {{date|2016-06-11|mdy}} | author = Tim Bird | website = elinux.org | format = PDF | pages = 5–6, 12–14}} 11. ^{{cite web | url = http://kernelnewbies.org/Linux_2_6_27#head-27c23aa79ee6da975ef95b4fff381ace1667a264 | title = Linux kernel 2.6.27, Section 1.7. ftrace, sysprof support | date = {{date|2008-10-09|mdy}} | accessdate = {{date|2014-07-23|mdy}} | website = kernelnewbies.org}} External links{{Commons category|Linux kernel}}
4 : Debugging|Free software programmed in C|Linux kernel features|Unix programming tools |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。