Re: [PATCH v3] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer
From: Michael Jeanson
Date: Thu Jun 04 2026 - 13:18:58 EST
On 2026-06-04 09:29, Arnaldo Carvalho de Melo wrote:
On Wed, May 20, 2026 at 12:26:13PM -0700, Ian Rogers wrote:
On Wed, May 20, 2026 at 12:15 PM Michael Jeanson <mjeanson@xxxxxxxxxxxx> wrote:
The 1.x branch of Babeltrace has been superseded by 2.x in 2020 and has
been unmaintained since 2022, efforts have started to remove it from
popular distributions.
Babeltrace 2.x offers a very similar 'ctf-writer' library that can be used
with minimal changes for the '--to-ctf' feature and has been packaged
since Debian 11 and Fedora 32.
This patch replaces the 'libbabeltrace' build feature with
'babeltrace2-ctf-writer' using pkgconfig detection, adjusts the naming of
the public headers and applies minor API cleanups.
There is no changes to the output ctf traces, the ctf-writer API still
implements version 1.8 of the CTF specification that can be read by
either Babeltrace 1 / 2 or any CTF compliant reader.
Also remove some ifdefs in the cli option parsing to allow printing the
helpful error message with '--to-ctf' when built without babeltrace2.
Signed-off-by: Michael Jeanson <mjeanson@xxxxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Derek Foreman <derek.foreman@xxxxxxxxxxxxx>
Cc: Ian Rogers <irogers@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: James Clark <james.clark@xxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
Its not applying to perf-tools-next, Michael, can you please take a
look?
Not sure what happenend, I rebased it on current perf-tools-next and sent it again as v4. Sorry for the noise.
Michael
Thanks,
- Arnaldo