Messages in this thread | | | Date | Fri, 19 Sep 2008 19:18:41 -0400 | From | "Frank Ch. Eigler" <> | Subject | Re: Unified tracing buffer |
| |
Hi -
On Fri, Sep 19, 2008 at 02:33:42PM -0700, Martin Bligh wrote:
> During kernel summit and Plumbers conference, Linus and others > expressed a desire for a unified tracing buffer system for multiple > tracing applications (eg ftrace, lttng, systemtap, blktrace, etc) to > use.
OK.
> [...] > STORAGE > ------- > > We will support multiple buffers for different tracing systems, with > separate names, event id spaces. [...]
OK. This is completely orthogonal to ...
> INPUT_FUNCTIONS > --------------- > > allocate_buffer (name, size) > return buffer_handle > > register_event (buffer_handle, event_id, print_function) > You can pass in a requested event_id from a fixed set, and > will be given it, or an error > 0 means allocate me one dynamically > returns event_id (or -E_ERROR) > > record_event (buffer_handle, event_id, length, *buf)
How do you imagine record_event() being used from the point of view of the instrumented module? Is it to be protected by some sort of test of the control variable? Is the little binary event buffer supposed to be constructed unconditionally? (On the stack?)
You should compare this to markers and tracepoints. It sounds to me like this is not that different from
trace_mark (event_name, "%*b", length, buf);
where the goofy "%*b" could be some magic to identify the proposed "everything is a short blob" event record type.
By the way, systemtap supports formatted printing that generates binary records via directives like "%4b" for 4-byte ints. I wonder if that would be a suitable facility for this and/or markers to allow instrumentation code to *generate* those binary event records.
Do you believe that fans of tracepoints would support a single void*/length struct parametrization?
> Data will be output via debugfs, and provide the following output streams: > > /debugfs/tracing/<name>/buffers/text > clear text stream (will merge the per-cpu streams via insertion > sort, and use the print functions)
Can you spell out this part a little more? I wonder because at the tracing miniconf on Wednesday we talked about systemtap's likely need to *consume* these trace events as they are being generated.
If systemtap can only see them as a binary blob or a rendered ascii string, they would not be as useful as if the record was decomposable in kernel. Perhaps the event-type-registration call can declare the binary struct, like a perl pack directive ... or a marker (binary) format string.
> CONTROL > > Sysfs style tree under debugfs > > /debugfs/tracing/<name>/buffers/enabed <--- binary value > > /debugfs/tracing/<name>/<event1> > /debugfs/tracing/<name>/<event2> > etc ... > provides a way to enable/disable events, see what's available, and > what's enabled.
This sort of control is (or should be) already available for markers.
- FChE
| |