Skip to content

Conversation

@fmoessbauer
Copy link
Member

We first acquire data about the clock of the LTTng US trace, which contains a reference point to the world clock. Then, we use that information to create the ftrace clock accordingly and finally mux the traces.

By that, the aligned traces can directly be viewed in tracecompass without any further postprocessing.

By separating the plugin registration part from the implementation part,
we prepare the codebase for adding further components.

Signed-off-by: Felix Moessbauer <[email protected]>
The log helper depends on stdio.h. This remained unnoticed, as all
downstream users have this header included anyways.

Signed-off-by: Felix Moessbauer <[email protected]>
We need to be able to recreate the clock definiton of another trace to
ensure clocks that are equal are actually detected as equal by the
muxer. Otherwise the traces which are related cannot be muxed.

Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer fmoessbauer self-assigned this Nov 19, 2025
@fmoessbauer fmoessbauer force-pushed the fm/clock-offset branch 2 times, most recently from c4cc9fe to 7effe03 Compare November 19, 2025 14:57
As a preparation to align the ftrace trace and the LTTng US trace, we
need a way to gather information about the clock used in the LTTng US
trace (stream). To avoid the parsing of the CTF metadata, we add a
sink that extracts the relevant clock definitions from the stream
beginning messages and emits them as JSON lines on a file descriptor.

Signed-off-by: Felix Moessbauer <[email protected]>
We first acquire data about the clock of the LTTng US trace, which
contains a reference point to the world clock. Then, we use that
information to create the ftrace clock accordingly and finally mux the
traces.

By that, the aligned traces can directly be viewed in tracecompass
without any further postprocessing.

Signed-off-by: Felix Moessbauer <[email protected]>
These env options are parsed by downstream plugins (like the CTF sink)
and define how the CTF files are layed out.

We further introduce a auto-generated config file to inject our own
tracer version if not overridden.

Signed-off-by: Felix Moessbauer <[email protected]>
The trace.dat file contains information that is important to map the
kernel trace to a userland trace. However, the APIs to access this
information is only exposed via exported symbols, but not officially
part of the API.

To deal with this until this has been clarified upstream, we add a build
option to allow the usage of a limited set of private libtracecmd
functions.

Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer fmoessbauer force-pushed the fm/clock-offset branch 2 times, most recently from 487e29f to 1aa1cf5 Compare November 20, 2025 11:49
The sink.ctf.fs sink has logic that detects if a processed trace is an
LTTng trace. If it is, the output directory is layed out as done by
LTTng. To support this, we need to pass metadata from the LTTng US trace
into the ftrace source. This is implemented in a two staged approach:
Metadata we can read from the ftrace itself is just added. Metadata
(like the trace-name) that is only available in the LTTng US trace is
copied over.

Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer fmoessbauer merged commit 7519ed2 into main Nov 20, 2025
6 checks passed
@fmoessbauer fmoessbauer deleted the fm/clock-offset branch November 20, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants