summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_events.c
diff options
context:
space:
mode:
authorSteven Rostedt2009-03-02 21:10:02 +0100
committerSteven Rostedt2009-03-02 21:10:02 +0100
commitc5e4e19271edfdf1abd4184933d40d646da6a091 (patch)
tree1ef485d68971b365a361638df57ee663c631b88f /kernel/trace/trace_events.c
parenttracing: add ftrace headers to event format files (diff)
downloadkernel-qcow2-linux-c5e4e19271edfdf1abd4184933d40d646da6a091.tar.gz
kernel-qcow2-linux-c5e4e19271edfdf1abd4184933d40d646da6a091.tar.xz
kernel-qcow2-linux-c5e4e19271edfdf1abd4184933d40d646da6a091.zip
tracing: add trace name and id to event formats
To be able to identify the trace in the binary format output, the id of the trace event (which is dynamically assigned) must also be listed. This patch adds the name of the trace point as well as the id assigned. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r--kernel/trace/trace_events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index cdcc3aed76fd..210e71ff82db 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -487,7 +487,11 @@ event_format_read(struct file *filp, char __user *ubuf, size_t cnt,
if (*ppos)
return 0;
- /* If this fails, so will the show_format. */
+ /* If any of the first writes fail, so will the show_format. */
+
+ trace_seq_printf(s, "name: %s\n", call->name);
+ trace_seq_printf(s, "ID: %d\n", call->id);
+ trace_seq_printf(s, "format:\n");
trace_write_header(s);
r = call->show_format(s);