[PATCH 15/16] tracing: show event name in trace for TRACE_EVENT created events

Steven Rostedt
2009-03-13T02:43:36Z

[-- Attachment #1: 0015-tracing-show-event-name-in-trace-for-TRACE_EVENT-cr.patch --]
[-- Type: text/plain, Size: 1019 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

Unlike TRACE_FORMAT() macros, the TRACE_EVENT() macros do not show
the event name in the trace file. Knowing the event type in the trace
output is very useful.

Instead of:

task swapper:0 [140] ==> ntpd:3308 [120]

We now have:

sched_switch: task swapper:0 [140] ==> ntpd:3308 [120]

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
kernel/trace/trace_events_stage_2.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_events_stage_2.h b/kernel/trace/trace_events_stage_2.h
index ca347af..5117c43 100644
--- a/kernel/trace/trace_events_stage_2.h
+++ b/kernel/trace/trace_events_stage_2.h
@@ -57,7 +57,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
\
field = (typeof(field))entry; \
\
- ret = trace_seq_printf(s, print); \
+ ret = trace_seq_printf(s, #call ": " print); \
if (!ret) \
return TRACE_TYPE_PARTIAL_LINE; \
\
--
1.6.1.3

--