From: Jon Lamb via lttng-dev <lttng-dev@lists.lttng.org>
To: lttng-dev@lists.lttng.org
Subject: [lttng-dev] Parsing in-memory CTF packets with babeltrace2
Date: Wed, 2 Mar 2022 14:18:21 -0800 [thread overview]
Message-ID: <CAJMh_qWB8JOPWNNRt+rFNk1--FTTfSUUjQjRJXg2GLaR4gfJgw@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1171 bytes --]
Hi,
I'm working on an program that is to receive CTF stream packets
and convert the contained events to a different format.
After reading through the babeltrace2 C API docs, I'm not
sure if it's possible to access the internal AST and parser
utilities used by the internal plugins, either manually
or through a source component plugin.
With a metadata text file at hand, is there a way to parse
CTF stream packet sitting in memory?
I'm trying to avoid having to write the in-memory packets to disk
first, and then use the source.ctf.fs component class to read them
back in as babeltrace2 API types.
For context, I have a few micros instrumented with barectf.
Depending on the deployment mode, I'm either sending CTF stream
packets out over serial or reading a ring buffer of packets via JTAG.
I can see this also being useful in a couple other dimensions I'd
eventually like to consider too:
* Implementing something lttng-relayd friendly for live viewer support
(parsing some of the packet header fields)
* Stream clock overflow bookkeeping (it'd let me reduce the probe effect of
have to manage a 32 or 64 bit clock on a 16 bit MCU)
Best,
Jon
[-- Attachment #1.2: Type: text/html, Size: 3743 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
reply other threads:[~2022-03-02 22:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAJMh_qWB8JOPWNNRt+rFNk1--FTTfSUUjQjRJXg2GLaR4gfJgw@mail.gmail.com \
--to=lttng-dev@lists.lttng.org \
--cc=lamb.jon.io@gmail.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