diff options
| author | Michael Jeanson <mjeanson@efficios.com> | 2026-06-04 13:17:05 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-04 17:34:52 -0300 |
| commit | 536e81f07450562caba8e62022763a78fd00a0a7 (patch) | |
| tree | 0670cc608eec2db349ca5c2e0985c2f77165bcb2 /tools/build/feature | |
| parent | b72ab69175157aac2f3ff1ebc0765e3899ba295b (diff) | |
perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer
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.
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Derek Foreman <derek.foreman@collabora.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build/feature')
| -rw-r--r-- | tools/build/feature/Makefile | 6 | ||||
| -rw-r--r-- | tools/build/feature/test-all.c | 6 | ||||
| -rw-r--r-- | tools/build/feature/test-babeltrace2-ctf-writer.c (renamed from tools/build/feature/test-libbabeltrace.c) | 3 |
3 files changed, 7 insertions, 8 deletions
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 9da5a4fd956a..62909a9c799d 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -45,7 +45,7 @@ FILES= \ test-pthread-barrier.bin \ test-stackprotector-all.bin \ test-timerfd.bin \ - test-libbabeltrace.bin \ + test-babeltrace2-ctf-writer.bin \ test-libcapstone.bin \ test-libcheck.bin \ test-compile-32.bin \ @@ -305,8 +305,8 @@ $(OUTPUT)test-backtrace.bin: $(OUTPUT)test-timerfd.bin: $(BUILD) -$(OUTPUT)test-libbabeltrace.bin: - $(BUILD) # -lbabeltrace provided by $(FEATURE_CHECK_LDFLAGS-libbabeltrace) +$(OUTPUT)test-babeltrace2-ctf-writer.bin: + $(BUILD) # -lbabeltrace2-ctf-writer provided by $(FEATURE_CHECK_LDFLAGS-babeltrace2-ctf-writer) $(OUTPUT)test-libcapstone.bin: $(BUILD) # -lcapstone provided by $(FEATURE_CHECK_LDFLAGS-libcapstone) diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index 1488bf6e6078..544563d62950 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -100,13 +100,13 @@ # if 0 /* - * Disable libbabeltrace check for test-all, because the requested + * Disable babeltrace2-ctf-writer check for test-all, because the requested * library version is not released yet in most distributions. Will * reenable later. */ -#define main main_test_libbabeltrace -# include "test-libbabeltrace.c" +#define main main_test_babeltrace2_ctf_writer +# include "test-babeltrace2-ctf-writer.c" #undef main #endif diff --git a/tools/build/feature/test-libbabeltrace.c b/tools/build/feature/test-babeltrace2-ctf-writer.c index 10bb69d55694..9c89082e9f88 100644 --- a/tools/build/feature/test-libbabeltrace.c +++ b/tools/build/feature/test-babeltrace2-ctf-writer.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -#include <babeltrace/ctf-writer/writer.h> -#include <babeltrace/ctf-ir/stream-class.h> +#include <babeltrace2-ctf-writer/writer.h> int main(void) { |
