mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Theodore Tso <tytso@mit.edu>,
	Arjan van de Ven <arjan@infradead.org>,
	Pekka Paalanen <pq@iki.fi>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jason Baron <jbaron@redhat.com>, Martin Bligh <mbligh@google.com>,
	Mathieu Desnoyers <compudj@krystal.dyndns.org>,
	"Frank Ch. Eigler" <fche@redhat.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Jens Axboe <jens.axboe@oracle.com>,
	Masami Hiramatsu <mhiramat@redhat.com>
Subject: Re: [PATCH 0/4][RFC] event tracer
Date: Tue, 24 Feb 2009 20:39:52 +0100	[thread overview]
Message-ID: <20090224193952.GB27491@elte.hu> (raw)
In-Reply-To: <20090224193344.638329210@goodmis.org>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> This is still RFC, do not pull.
> 
> This patch set gives the ability to add a format string and 
> args to a trace point declaration. Then it gives a tracer an 
> opportunity to override the header macro and use the default 
> trace format to trace the object.
> 
> For example (and used in this patch series), the sched 
> tracepoint declarations are moved from include/trace/sched.h 
> to include/trace/sched_event_types.h, and instead of using the 
> macro DECLARE_TRACE we use DECLARE_TRACE_FMT. The first three 
> arguments are the same, but it adds 2 more arguments. A printf 
> format and arguments.
> 
> The new trace/sched.h file contains:
> 
>   #include <linux/sched.h>
>   #include <linux/tracepoint.h>
> 
>   #include <trace/sched_event_types.h>
> 
> The sched_event_types.h file has:
> 
>  DECLARE_TRACE_FMT(sched_kthread_stop,
>         TPPROTO(struct task_struct *t),
>                   TPARGS(t),
>                    "task %s:%d", TPARGS(t->comm, t->pid));
> 
> The tracepoint.h defines DECLARE_TRACE_FMT as:
> 
>  #define DECLARE_TRACE_FMT(name, proto, args, fmt, fmt_args) \
>         DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))
> 
> 
> But in kernel/trace/events.c we have:
> 
>  /* trace/<type>.h here */
>  #include <trace/sched.h>
> 
>  #include "trace_events.h"
> 
>  /* trace/<type>_event_types.h here */
>  #include <trace/sched_event_types.h>
> 
> The trace_events.h redefines the DECLARE_TRACE_FMT and makes a 
> hook for to automate adding event points.
> 
> To add event points, convert to the DECLARE_TRACE_FMT, add 
> your default printf format, and then add to events.c, the 
> <type>.h and <type>_event_types.h as described. Then your 
> trace points will appear in the event tracer.
> 
> Next I'll convert the rest of the tracepoints that are already 
> defined to this format.

Looks very good - especially the VFS enumeration of all present 
tracepoints. Let me know when it gets into pullable state.

	Ingo

  parent reply	other threads:[~2009-02-24 19:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24 19:33 Steven Rostedt
2009-02-24 19:33 ` [PATCH 1/4][RFC] tracing: add event trace infrastructure Steven Rostedt
2009-02-24 19:42   ` Andrew Morton
2009-02-24 19:46     ` Ingo Molnar
2009-02-24 22:11       ` Steven Rostedt
2009-02-24 19:33 ` [PATCH 2/4][RFC] tracing: add DECLARE_TRACE_FMT to tracepoint.h Steven Rostedt
2009-02-24 19:33 ` [PATCH 3/4][RFC] tracing: add schedule events to event trace Steven Rostedt
2009-02-24 19:33 ` [PATCH 4/4][RFC] tracing: make event directory structure Steven Rostedt
2009-02-24 19:39 ` Ingo Molnar [this message]
2009-02-24 19:42 ` [PATCH 0/4][RFC] event tracer Peter Zijlstra
2009-02-24 22:10   ` Steven Rostedt
2009-02-24 22:25     ` Masami Hiramatsu
2009-02-24 22:31       ` Steven Rostedt
2009-02-25  1:01         ` Mathieu Desnoyers
2009-02-25  1:15           ` Steven Rostedt
2009-02-25  1:46             ` Mathieu Desnoyers
2009-02-25  0:59 ` Mathieu Desnoyers
2009-02-25  2:10 ` Frank Ch. Eigler
2009-02-25 14:19   ` Jason Baron

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=20090224193952.GB27491@elte.hu \
    --to=mingo@elte.hu \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=compudj@krystal.dyndns.org \
    --cc=fche@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=jens.axboe@oracle.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=mhiramat@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pq@iki.fi \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®