[ltt-dev] [patch 2/9] LTTng instrumentation - irq
rostedt at goodmis.org
Tue Mar 24 22:00:49 EDT 2009
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
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.
More information about the lttng-dev