zedtrace base code
PATCH 1/4 zedtrace base code
The base Zed tracer.
Signed-off-by Tom Zanussi <[email protected]>
--- kernel/trace/Kconfig | 45 ++ kernel/trace/Makefile | 1 + kernel/trace/trace_binary/Makefile | 3 + kernel/trace/trace_binary/zed.c | 971 +++++++++++++++++++++++++++++++++ kernel/trace/trace_binary/zed.h | 236 ++++++++ kernel/trace/trace_binary/zed_sched.c | 201 +++++++ kernel/trace/trace_binary/zed_sched.h | 73 +++ 7 files changed, 1530 insertions(+), 0 deletions(-) create mode 100644 kernel/trace/trace_binary/Makefile create mode 100644 kernel/trace/trace_binary/zed.c create mode 100644 kernel/trace/trace_binary/zed.h create mode 100644 kernel/trace/trace_binary/zed_sched.c create mode 100644 kernel/trace/trace_binary/zed_sched.h
kernel/trace/Kconfig +45 -0
@@ -47,6 +47,51 @@ config TRACING menu "Tracers" +config ZEDTRACE + bool "Zed Kernel Tracer" + select RELAY + select TRACING + help + Say Y here for a low-overhead general-purpose kernel tracing + option that allows you to selectively trace any/all + tracepoints currently defined in the kernel, with generic + kernel or userspace filtering, as desired. Trace events + from different subsystems e.g. sched/block/workqueue appear + together seamlessly in the trace output, allowing + interactions between subsystems to be identified and + providing an overall view of system-wide activity. + + All trace events are self-describing; there are a number of + userspace tools available in the zedtrace tarball that take + advantage of this and make all of the events and event + fields available to general-purpose language interpreters as + native types and event handler funtions. For instance, the + 'zedperl' event interpreter allows the full power of Perl to + be used to aggregate and analyze either a saved set of + per-cpu trace files or or a live trace stream in real-time. + There are also simpler utilities that can be used to do the + same thing but that simply print the data in a generic way. + In any case, because the data is self-describing, these + tools don't need to be recompiled when new events are added + to the kernel. Users can also trivially write their own + front-ends to display and/or aggregate/analyze the trace + stream in custom ways by plugging in to the modular Zed + architecture; interpreters for other languages such as + Python, Ruby, etc. are expected soon. + + Because Zed is based on the best-of-breed blktrace-derived + UTT userspace tracing library, users can trace not only to + local disk but over the network in several different ways, + and as mentioned can also do 'live tracing' using the + combined per-cpu data stream. + + See kernel/trace/trace_binary/zedtrace.h for the current set + of event definitions, which can be used as examples for + adding your own. + + See http://utt.sourceforge.net/zedtrace.html for userspace + tools, examples and further documentation. + config FUNCTION_TRACER bool "Kernel Function Tracer" depends on HAVE_FUNCTION_TRACER
kernel/trace/Makefile +1 -0
@@ -33,5 +33,6 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o obj-$(CONFIG_POWER_TRACER) += trace_power.o +obj-$(CONFIG_ZEDTRACE) += trace_binary/ libftrace-y := ftrace.o
kernel/trace/trace_binary/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_ZEDTRACE) += zedtrace.o + +zedtrace-objs := zed.o zed_sched.o
kernel/trace/trace_binary/zed.c new file +971 -0
971 lines not on this page · raw message
kernel/trace/trace_binary/zed.h new file +236 -0
236 lines not on this page · raw message
kernel/trace/trace_binary/zed_sched.c new file +201 -0
201 lines not on this page · raw message
kernel/trace/trace_binary/zed_sched.h new file +73 -0
73 lines not on this page · raw message
Signature · 1 line
1.5.6.3