mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Theodore Tso <tytso@mit.edu>,
	Mathieu Desnoyers <compudj@krystal.dyndns.org>,
	Tom Zanussi <tzanussi@gmail.com>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Jason Baron <jbaron@redhat.com>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 6/7] tracing: add trace name and id to event formats
Date: Mon, 02 Mar 2009 15:29:31 -0500	[thread overview]
Message-ID: <20090302203025.042001098@goodmis.org> (raw)
In-Reply-To: <20090302202925.364437449@goodmis.org>

[-- Attachment #1: 0006-tracing-add-trace-name-and-id-to-event-formats.patch --]
[-- Type: text/plain, Size: 1013 bytes --]

From: Steven Rostedt <srostedt@redhat.com>

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 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index cdcc3ae..210e71f 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);
-- 
1.5.6.5

-- 

  parent reply	other threads:[~2009-03-02 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 20:29 [PATCH 0/7] [GIT PULL] trace event updates for tip Steven Rostedt
2009-03-02 20:29 ` [PATCH 1/7] tracing: add TRACE_FIELD_SPECIAL to record complex entries Steven Rostedt
2009-03-02 20:29 ` [PATCH 2/7] tracing: add protection around modify trace event fields Steven Rostedt
2009-03-02 20:29 ` [PATCH 3/7] tracing: make trace_seq_reset global and rename to trace_seq_init Steven Rostedt
2009-03-02 20:29 ` [PATCH 4/7] tracing: add format file to describe event struct fields Steven Rostedt
2009-03-02 21:11   ` Andrew Morton
2009-03-02 20:29 ` [PATCH 5/7] tracing: add ftrace headers to event format files Steven Rostedt
2009-03-02 20:29 ` Steven Rostedt [this message]
2009-03-02 20:29 ` [PATCH 7/7] tracing: add print format to event trace " Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090302203025.042001098@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=srostedt@redhat.com \
    --cc=tytso@mit.edu \
    --cc=tzanussi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome