From: Alec Rivers via lttng-dev <lttng-dev@lists.lttng.org>
To: lttng-dev@lists.lttng.org
Subject: Adding new events / streams to an existing trace?
Date: Mon, 21 Jul 2025 23:21:48 -0700 [thread overview]
Message-ID: <CAK49rV4DhdWJ8HeebmOhSMAj68anghiKMTKwxBWaSvtGcdW0bw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
Hello,
I am trying to process an LTTng trace using babeltrace2's Python API. What
I want to do is add a new stream of events to an existing trace. My
approach is to create a custom source component that reads the existing
trace and forwards existing messages unchanged, but adds (interleaves, in
fact) some new events in a new stream.
So I have a custom UserMessageIterator that holds
a TraceCollectionMessageIterator that is reading from the original trace.
But if I output the unchanged events from the input iterator, that means
those events have a pre-baked trace and pre-baked trace class, to which I
am unable to add streams. (It seems that the C API may allow this, but the
Python one does not.) I could create a new trace class and a new stream for
my synthetic events, but then I'd have two parallel traces, and that's not
what I want (or is it? I'm new to all this).
For context, what I'm trying to achieve is to debug some erratic behavior
in an embedded Linux application, and I decided I'd like to see the
syscalls in the Flame Chart view in Trace Compass. So I'm my utility reads
all the syscall_entry_* and syscall_exit_* events and generates
corresponding func_entry and func_exit events. That part works fine -- but
getting the events into a trace alongside the existing events is what's
stymying me.
Thanks in advance for any help,
Alec
[-- Attachment #2: Type: text/html, Size: 1559 bytes --]
reply other threads:[~2025-07-22 21:48 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=CAK49rV4DhdWJ8HeebmOhSMAj68anghiKMTKwxBWaSvtGcdW0bw@mail.gmail.com \
--to=lttng-dev@lists.lttng.org \
--cc=alec@shapertools.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