linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libtracecmd API extensions
@ 2025-11-20 12:24 MOESSBAUER, Felix
  2025-11-20 18:08 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: MOESSBAUER, Felix @ 2025-11-20 12:24 UTC (permalink / raw)
  To: linux-trace-devel@vger.kernel.org; +Cc: Kiszka, Jan

Dear Tracers,

while developing a kernel ftrace to Common Trace Format (CTF) converter
[1], I noticed a couple of aspects of the libtracecmd API I would like
to discuss. In general, I am VERY happy with the libtracefs,
libtraceevent and libtracecmd API. These are great libraries which
really helped to get this implemented easily.

Trace clocks:

- Information about the used trace clock is available in the trace.dat,
however there is no public API to extract it
- A trace clock (e.g. mono) to world-clock snapshot could be added to
the trace.dat to more easily align the trace with other traces

Metadata:

- some metadata (like uname) is already included in the trace.dat,
however the APIs to retrieve it are private: tracecmd_get_uname
- further metadata like a full "uname -a" output and /proc/cmdline
would be helpful

Event time ranges:

- it would be good to have an API to get the first and last event
timestamp per CPU (I'm currently fully walking the events to get that
data)

PS:
We are also looking into writing a converter in the opposite direction
(i.e. CTF -> ftrace binary format / trace.dat), but it looks like the
libtraceevent is a pure parsing library and cannot be used for
synthesizing. Is this true, or did I miss something?

[1] https://github.com/siemens/bt2-ftrace-to-ctf

Best regards,
Felix Moessbauer

-- 
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-21 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 12:24 libtracecmd API extensions MOESSBAUER, Felix
2025-11-20 18:08 ` Steven Rostedt
2025-11-21 10:56   ` MOESSBAUER, Felix

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).