linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "MOESSBAUER, Felix" <felix.moessbauer@siemens.com>
To: "linux-trace-devel@vger.kernel.org" <linux-trace-devel@vger.kernel.org>
Cc: "Kiszka, Jan" <jan.kiszka@siemens.com>
Subject: libtracecmd API extensions
Date: Thu, 20 Nov 2025 12:24:18 +0000	[thread overview]
Message-ID: <ee6cc8b90fb0d71f412645d7671b7130d72fecc2.camel@siemens.com> (raw)

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


             reply	other threads:[~2025-11-20 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 12:24 MOESSBAUER, Felix [this message]
2025-11-20 18:08 ` libtracecmd API extensions Steven Rostedt
2025-11-21 10:56   ` MOESSBAUER, Felix

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=ee6cc8b90fb0d71f412645d7671b7130d72fecc2.camel@siemens.com \
    --to=felix.moessbauer@siemens.com \
    --cc=jan.kiszka@siemens.com \
    --cc=linux-trace-devel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).