<div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div>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).</div><div><br></div><div>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.</div><div><br></div><div>Thanks in advance for any help,</div><div><br></div><div>Alec</div></div>
</div>