[lttng-dev] [RFC PATCH lttng-modules] LTTng logger ABI

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Mon Feb 17 11:21:47 EST 2014


----- Original Message -----
> From: "Karim Yaghmour" <karim.yaghmour at opersys.com>
> To: "Mathieu Desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Monday, February 17, 2014 11:13:42 AM
> Subject: Re: [RFC PATCH lttng-modules] LTTng logger ABI
> 
> 
> On 14-02-17 11:08 AM, Mathieu Desnoyers wrote:
> > I'd be tempted to ask: is that the behavior of ftrace when receiving an
> > event larger than a page through trace_marker ?
> 
> I've never bothered looking it up to be quite honest.

I'm seeing here that the event in trace_marker is limited to 1 page (it can
cross a page boundary, so ftrace deals with 2 pages at most). It makes sense,
since Ftrace's buffers are split into pages.

Its truncation happens here:

        if (cnt > TRACE_BUF_SIZE)
                cnt = TRACE_BUF_SIZE;

> 
> > We could indeed truncate the event, but it would increase complexity
> > compared to the current patch. So I'm tempted to wait a bit before doing
> > so.
> 
> What's the maximum length of events lttng-logger will take? We just
> truncate in the Android user-space library that writes the atrace events.

The minimum size of sub-buffers (trace packets) LTTng can allocate is a page.
However, the available space for event records is slightly less, since we have
a packet header at the beginning of the packet. Since the packet header can
be extended between LTTng versions, it's hard to say. The space can be
slightly less if event contexts are enabled (this can be done dynamically
at runtime, per-buffer).

Thoughts ?

Thanks,

Mathieu

> 
> --
> Karim Yaghmour
> CEO - Opersys inc. / www.opersys.com
> http://twitter.com/karimyaghmour
> 
> 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list