Re: [patch 2/9] LTTng instrumentation - irq

From: Steven Rostedt
Date: Tue Mar 24 2009 - 22:01:14 EST



On Tue, 24 Mar 2009, Mathieu Desnoyers wrote:
>
> This is actually a very good example of what Christoph Hellwig, Peter
> Zijlstra and myself have been trying to warn you about the TRACE_EVENT
> macro : it exports the tracepoints to userspace, and thus makes them a
> userspace-visible API, when those tracepoints should be tied to the
> kernel code and nothing else. An adaptation layer should provide the
> abstractions that makes the information presented to the user more
> "logical".

Let me correct you here. TRACE_EVENT does ***NOT*** export anything to
userspace. There is no code what so ever in TRACE_EVENT that does so.

Now, ftrace does export information using TRACE_EVENT to userspace. But
that is the way ftrace wants to handle it. There's nothing needed to
export to userspace. What is exported, is exported ***BECAUSE*** it can
change. I'll only try to keep the format that is exported the same. But
nothing should rely on what the format represents staying the same.

If someone adds a TRACE_EVENT, you can uses it to record you data, anyway
you like. Ftrace will use it to show how to read the binary data, which
is only needed if you want to do that. It uses the print format to print
to the console in case of failure. Or to the trace file, which by the way
can also change without notice.


-- Steve

--
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/