Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [RFC PATCH lttng-modules] LTTng logger ABI
Date: Mon, 17 Feb 2014 16:40:35 +0000 (UTC)	[thread overview]
Message-ID: <1299774859.26113.1392655235092.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <53023832.6010005@opersys.com>



----- Original Message -----
> From: "Karim Yaghmour" <karim.yaghmour@opersys.com>
> To: "Mathieu Desnoyers" <mathieu.desnoyers at efficios.com>
> Cc: lttng-dev at lists.lttng.org
> Sent: Monday, February 17, 2014 11:26:26 AM
> Subject: Re: [RFC PATCH lttng-modules] LTTng logger ABI
> 
> 
> On 14-02-17 11:21 AM, Mathieu Desnoyers wrote:
> > 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;
> 
> Good to know. So at least we know ftrace truncates by default.
> 
> > 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 ?
> 
> I'd be tempted to say that anything that big should be good enough. But
> from the sounds of it, even doing strlen's in user-space wouldn't be
> good enough to ensure that the data fits in lttng buffer. I can't say
> that I have a good solution here. Ideally there should be some form of
> automatic truncation somewhere without having to go through the expense
> of strlens or the likes.

trace.h:#define TRACE_BUF_SIZE		1024

so actually, ftrace truncates at 1024 bytes. We could very well do the same
within the lttng-logger write() op.

Thoughts ?

Thanks,

Mathieu

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

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



  reply	other threads:[~2014-02-17 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 22:08 Mathieu Desnoyers
2014-02-17 15:09 ` Karim Yaghmour
2014-02-17 16:08   ` Mathieu Desnoyers
2014-02-17 16:13     ` Karim Yaghmour
2014-02-17 16:21       ` Mathieu Desnoyers
2014-02-17 16:26         ` Karim Yaghmour
2014-02-17 16:40           ` Mathieu Desnoyers [this message]
2014-02-17 16:41             ` Karim Yaghmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299774859.26113.1392655235092.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox