Skip to content

Commit

Permalink
tracing: add trace name and id to event formats
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt committed Mar 2, 2009
1 parent 91729ef commit c5e4e19
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/trace/trace_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c5e4e19

Please sign in to comment.