LTT for 2.5.44-bk2 1/10: Core definitions
Subsystems (2)
PATCH 1/1 LTT for 2.5.44-bk2 1/10: Core definitions
Hello Linus,
We've had this patch around for quite a while and it has been reviewed by quite a few folks, including Ingo Molnar, Christoph Hellwig, Roman Zippel, Pavel Machek, and yourself. Here's a summary of the changes we carried out following LKML feedback:
- Add Lockless event logging
- Add Per-CPU buffering
- Add TSC timestamping
- Changed tracer from device to kernel subsystem
- Change coding style to match kernel
Considering that this patch has been around for over 3 years now, that it has been extensively modified to satisfy the requirements voiced on the LKML, and that LTT has been adopted as the main tracing tool for Linux, Linus please apply.
We've also run an extensive set of stress tests on the patch which show that that tracing has no overhead when unused and very low overhead when used:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103573710926859&w=2
Basically, the overhead is 0% when compiled out, < 0.5% when compile in, and 2.0% when tracing all kernel events and writing the data to disk.
Note that the patch set is quite modular. In other words, you can apply the core infrastructure (patches # 1, 2 and 3) and apply the actual trace statement patches later on (patches # 4 through 10).
D: This patch includes all the definitions (headers/configs/makefiles)
D: required by the trace subsystem.
diffstat:
MAINTAINERS | 7 include/asm-generic/trace.h | 86 ++++ include/linux/trace.h | 930 ++++++++++++++++++++++++++++++++++++++++++++ init/Config.help | 23 + init/Config.in | 1
The complete patch is available from:
http://opersys.com/ftp/pub/LTT/ExtraPatches/patch-ltt-linux-2.5.44-bk2-021029-2.2.bz2
(This set of patches is against the bk2 snapshot available from:
ftp://ftp.kernel.org/pub/linux/kernel/v2.5/snapshots/)
MAINTAINERS +7 -0
@@ -983,6 +983,13 @@ W: http://linuxppc64.org L: [email protected] S: Supported +LINUX TRACE TOOLKIT +P: Karim Yaghmour +M: [email protected] +W: http://www.opersys.com/LTT +L: [email protected] +S: Maintained + LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP Dynamic Disks) P: Richard Russon (FlatCap) M: [email protected]
include/asm-generic/trace.h +86 -0
86 lines not on this page · raw message
include/linux/trace.h +930 -0
930 lines not on this page · raw message
init/Config.help +23 -0
@@ -115,3 +115,26 @@ CONFIG_KMOD replacement for kerneld.) Say Y here and read about configuring it in <file:Documentation/kmod.txt>. +CONFIG_TRACE + It is possible for the kernel to log important events to a trace + facility. Doing so, enables the use of the generated traces in order + to reconstruct the dynamic behavior of the kernel, and hence the + whole system. + + The tracing process contains 4 parts : + 1) The logging of events by key parts of the kernel. + 2) The tracer that keeps the events in a data buffer. + 3) A trace daemon that interacts with the tracer and is + notified every time there is a certain quantity of data to + read from the tracer. + 4) A trace event data decoder that reads the accumulated data + and formats it in a human-readable format. + + If you say Y, the first two components will be built into the kernel. + Critical parts of the kernel will call upon the kernel tracing + function. The data is then recorded by the tracer if a trace daemon + is running in user-space and has issued a "start" command. + + For more information on kernel tracing, the trace daemon or the event + decoder, please check the following address : + http://www.opersys.com/LTT
init/Config.in +1 -0
@@ -9,6 +9,7 @@ bool 'Networking support' CONFIG_NET bool 'System V IPC' CONFIG_SYSVIPC bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL +bool 'Tracing support' CONFIG_TRACE endmenu mainmenu_option next_comment