Re: [PATCH] ftrace: add an fsync tracer

From: Arjan van de Ven
Date: Thu Nov 06 2008 - 16:13:36 EST


On Thu, 06 Nov 2008 15:19:48 -0500
fche@xxxxxxxxxx (Frank Ch. Eigler) wrote:

> Arjan van de Ven <arjan@xxxxxxxxxxxxx> writes:
>
> > [...]
> > what is the real need is
> > 1) Have a trace point in the source
> > 2) Associate a "formatting function" with that point
> > (which basically transforms the trace parameters to, say, a
> > string) 3) A way to turn the trace point on/off.
>
> For 1 and 2, it may be worth considering a plain trace_mark() in
> do_sync(). The complication that makes this uglier than a one-liner

no why is that?

what you really need is to be able to provide a callback function
pointer that will do the formatting,
or as Peter wants it, a format string.

(and we can easily make a format string that knows how to print a
struct file, no big deal, I suspect that is a common thing actually)

Doing this like you propose is just too complex and too specialistic;
the reality is that merely formatting the arguments of a trace point is
the common case, and I suspect for 99.9% of the cases we can get away
with a standard default formatting.

We should make THAT easy. Not complex or ugly. But easy.

And then if I or some tool wants to see a tracepoint, we have some
standard way to enumerate them and turn individual ones on with their
standard formatting ... and that's it.
no iffs or buts


--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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/