]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tracing: add trace name and id to event formats
authorSteven Rostedt <srostedt@redhat.com>
Mon, 2 Mar 2009 20:10:02 +0000 (15:10 -0500)
committerSteven Rostedt <srostedt@redhat.com>
Mon, 2 Mar 2009 20:10:02 +0000 (15:10 -0500)
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>
kernel/trace/trace_events.c

index cdcc3aed76fdaa9c79d436574ef45acfcc9775fa..210e71ff82db800bf95a2438905061b1cc7616e6 100644 (file)
@@ -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);