Re: [PATCH 0/4][RFC] event tracer

From: Mathieu Desnoyers
Date: Tue Feb 24 2009 - 20:46:23 EST


* Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:
>
> On Tue, 24 Feb 2009, Mathieu Desnoyers wrote:
>
> > * Steven Rostedt (rostedt@xxxxxxxxxxx) wrote:
> > >
> > > On Tue, 24 Feb 2009, Masami Hiramatsu wrote:
> > > > >
> > > > > #undef TPFMT
> > > > > #define TPFMT(fmt, args...) \
> > > > > "(%s)" fmt "\n", #call, ##args
> > > > >
> > > > > and then I could do
> > > > >
> > > > > event_printk(fmt);
> > > >
> > > > Why don't you do as below? :)
> > > > event_printk_line("(" #call ")" ##fmtandargs);
> > >
> > > Still need to sneak that "\n" in ;-)
> > >
> >
> > Why do you need the \n ? Having all event format strings ending with \0
> > should be enough to tell event_printk to generate a \n each time it
> > encounters a format string \0. Doing so would save 1 byte per format
> > string.
>
> Because currently event_printk uses a generic function that acts pretty
> much like ftrace_printk.
>
> I like having fmt and args separate. This way, we can add more stuff to
> the end if we ever want to. For now it's a '\n'. We can deal with
> those extra bytes.
>

Ah ok, given you need it as a separator too, that makes sense.

Mathieu

> -- Steve
>

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/