Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] LTTng specialized probes
Date: Wed, 8 Oct 2008 22:24:24 -0400	[thread overview]
Message-ID: <20081009022424.GB16931@Krystal> (raw)
Message-ID: <20081009022424.4yx1AKwQfZCRRnBaPXQXykRen2yb0AlVgAkGDFNWV4I@z> (raw)
In-Reply-To: <48ECD814.4030705@web.de>

* Jan Kiszka (jan.kiszka at web.de) wrote:
> Mathieu Desnoyers wrote:
> > Hi Michael,
> > 
> > * Michael Davidson (md at google.com) wrote:
> >> Hi, Mathieu!
> >>
> >> Jiaying forwarded this to me and I wanted to try to understand a
> >> little better exactly what direction you are headed in.
> >>
> >> Like Martin, I am (at least) a little confused and since I wasn't
> >> involved in the discussions in Portland please forgive me if I am
> >> going over old ground here.
> >>
> > 
> > No problem, I'll try to answer the best I can. Don't hesitate to ask for
> > clarifications if I am not clear enough.
> > 
> >> It seems to me that one of the key issues in getting good performance
> >> out of any kernel tracing system is that you have to record the data
> >> that you are trying to capture as quickly as possible. To me that
> >> means that during the initial recording of the data, to the maximum
> >> extent possible, you don't even look at it - you just slam it straight
> >> into your recording buffer and you are done (this should work well for
> >> the majority of cases where the data being captured are just scalar
> >> values - the more exotic the data the more processing it will need).
> >>
> > 
> > Yes, I agree that the best performance is achieved by having a probe
> > which already "knows" how much data to save and just "does it", and this
> > is what we want for high-throughput events.
> 
> I only loosely followed the thread and the latest format-string marker
> serialization code. So sorry in advance in case I contribute "cold
> coffee" now:
> 
> Has anyone thought of / tried out some caching mechanism for this task?
> I mean, scan the format string once (I don't think it will change during
> runtime... :->), save somewhere that it expects n bytes of
> to-be-serialized data on the caller's stack and then get away with only
> copying those over into the trace buffer on succeeding marker hits?
> 

A few reasons not to do this :
- The data won't always be on the stack in the same layout we want it in
  the trace. It is especially true for data smaller than the
  architecture pointer size which is aligned on the stack.
- Also, I fear that such caching mechanism will end up being much more
  complex, error prone and difficult to maintain than having a simple
  format string parser for the slow common-case and specialized code for
  the fast case. It's a bit like a JIT, but we use kernel hackers to
  generate the code. ;)

Mathieu

> Just a thought...
> 
> Jan
> 



-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20081008/fae80f7e/attachment-0003.pgp>


  parent reply	other threads:[~2008-10-09  2:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5df78e1d0809231814i4b9b98eeyfb9746e5dbb9eb72@mail.gmail.com>
     [not found] ` <20080924072503.GA15570@bolzano.suse.de>
     [not found]   ` <532480950809240032t644448f7lc4fdc0dffca69b9@mail.gmail.com>
2008-10-06 14:11     ` Mathieu Desnoyers
2008-10-06 15:14       ` Martin Bligh
2008-10-06 15:26         ` Mathieu Desnoyers
2008-10-06 15:37           ` Martin Bligh
2008-10-06 15:56             ` Mathieu Desnoyers
2008-10-06 17:55       ` Jiaying Zhang
2008-10-06 17:55         ` Jiaying Zhang
2008-10-06 17:55         ` Jiaying Zhang
     [not found]         ` <5df78e1d0810071116i2e9790cdx8d5854dbfa50cfaf@mail.gmail.com>
2008-10-07 21:28           ` Michael Davidson
2008-10-07 21:28             ` Michael Davidson
2008-10-07 21:28             ` Michael Davidson
2008-10-08  0:07             ` Mathieu Desnoyers
2008-10-08 15:56               ` Jan Kiszka
2008-10-08 15:56                 ` Jan Kiszka
2008-10-08 15:56                 ` Jan Kiszka
2008-10-08 16:06                 ` Martin Bligh
2008-10-09  2:43                   ` Mathieu Desnoyers
2008-10-09  2:24                 ` Mathieu Desnoyers [this message]
2008-10-09  2:24                   ` Mathieu Desnoyers
2008-10-09  2:24                   ` Mathieu Desnoyers
2008-10-09  3:04               ` Michael Davidson
2008-10-09  3:04                 ` Michael Davidson
2008-10-09  3:04                 ` Michael Davidson
2008-10-09 15:28                 ` Mathieu Desnoyers
2008-10-09 15:39                   ` Martin Bligh
2008-10-09 16:15                     ` Mathieu Desnoyers
2008-10-09 16:28                       ` Martin Bligh
2008-10-09 16:55                         ` Mathieu Desnoyers
2008-10-08  0:26         ` Mathieu Desnoyers

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=20081009022424.GB16931@Krystal \
    --to=compudj@krystal.dyndns.org \
    /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