From: alexandre.montplaisir@polymtl.ca (Alexandre Montplaisir)
Subject: [lttng-dev] Writing a babeltrace output plugin
Date: Tue, 17 Apr 2012 11:30:30 -0400 [thread overview]
Message-ID: <4F8D8C96.5020301@polymtl.ca> (raw)
In-Reply-To: <20120417150558.GA31475@Krystal>
On 12-04-17 11:05 AM, Mathieu Desnoyers wrote:
> [...]
> The ideas I pondered were either to change the grammar late in the
> game and prefix a dot (".") before any toplevel dynamic scope, or make
> the LTTng tracer preprend an underscore before each event field, which
> gets removed by the trace analyzer. I'm not particularly proud of this
> hack though. Comments are welcome.
Matthew and I have discussed it before, and adding an underscore in
front is fine. However, we think this should be specified in the CTF
spec, and should not be optional. This makes writing a parser much
easier, since you systematically remove the first character, and it
avoids having to parse the first character for every single field name.
For example:
developer adds a tracepoint, with a field called "field1"
tracer adds the underscore when writing the CTF metadata, "_field1"
when reading a trace, the parser removes the "_"
Viewers and readers (Babeltrace, Eclipse, etc.) only see the "field1" part.
That way users never see the underscore itself.
Thoughts?
--
Alexandre Montplaisir
DORSAL lab,
?cole Polytechnique de Montr?al
next prev parent reply other threads:[~2012-04-17 15:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 10:55 [lttng-dev] Babeltrace ctf-text duplicated error message Oestman, Fredrik
2012-04-03 11:35 ` [lttng-dev] Writing a babeltrace output plugin Oestman, Fredrik
2012-04-03 12:57 ` Mathieu Desnoyers
2012-04-03 13:31 ` Oestman, Fredrik
2012-04-03 13:33 ` Mathieu Desnoyers
2012-04-03 13:34 ` Mathieu Desnoyers
2012-04-03 14:06 ` Oestman, Fredrik
2012-04-03 14:10 ` Mathieu Desnoyers
2012-04-03 14:21 ` Julien Desfossez
2012-04-04 7:00 ` Oestman, Fredrik
2012-04-17 6:57 ` Oestman, Fredrik
2012-04-17 15:05 ` Mathieu Desnoyers
2012-04-17 15:30 ` Alexandre Montplaisir [this message]
2012-04-17 15:44 ` Matthew Khouzam
2012-04-17 15:48 ` Mathieu Desnoyers
2012-04-03 12:53 ` [lttng-dev] Babeltrace ctf-text duplicated error message 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=4F8D8C96.5020301@polymtl.ca \
--to=alexandre.montplaisir@polymtl.ca \
/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