From nobody Sun May 24 22:33:48 2026 Received: from smtpout.efficios.com (smtpout.efficios.com [158.69.130.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1B6730EF7E; Wed, 20 May 2026 19:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=158.69.130.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779304511; cv=none; b=mAd57ZoqCYVVWwxDowvgpxtsN2kJAPIUpYFi+f4Q1KnKPQID3B9rdct9/HsfY77ziJ9zuvggq1WBIuj+d9m48GB8+uPnuN1Rm8Fy/+cXdDGj70aiKZ3xVBaN0UWIrgYL+MNMIabztpkArb8R8bcwh6RRZGxJGJRV/yJZcSU9cpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779304511; c=relaxed/simple; bh=k841kazny7R6PIdGQauD1i15X84QTaIhOpV/ZvpqeYg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=J70u6XyoXm4ZnUXZd/5o58MsJSlTa52bSVUnJ0xC8HcAHGK375btqoHn8j60p8h7WFhOvPhYtunI5CcG6jyKJNygxt2PC21hzdyT+AVhw79vzizuor2g7IDJtBGBRFNG9T7PYgoClnKdnpBmOkzekmCrP7ia5C03J1BvUk/mziY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=s6h7rWbh; arc=none smtp.client-ip=158.69.130.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="s6h7rWbh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficios.com; s=smtpout1; t=1779304502; bh=D6Hz398U2OOaLRcAAhV2qbdRmthZGArFLy9PXrujlW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s6h7rWbh0zdobIYHbLn1OCMIh6/YlBOIcVtJrAjwGmcwm8HRa0rFTcsPGxjln0yMi u5r8SU2PNtTP7UY5mu85SZ+wDJSDfyhy7/+SyF8kbm67KNRIhAVsysyEpvMR6F7KXy Dz4hfkvjj8dc59QrNZXcWYL613zNMwIPHLI65mMdtUz69gqtn1OwGEs9DvWLKTCAfZ 5b1rql/+1ODZNPMjj7mrRiTMeU8xzq9Ehbl53xLRwGACngSlbym7nBoq7R5eq7bbBG Zd80W0IpFva6a1nWRbJD/paMsEjMYB+sb0yVQWNX9n/kMEKtLNZMA1nlC0u4MpNFJm U/laeKM+cs/BQ== Received: from laptop-mjeanson.internal.efficios.com (mtl.efficios.com [216.120.195.104]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4gLLpF71Kqz5Q8; Wed, 20 May 2026 15:15:01 -0400 (EDT) From: Michael Jeanson To: linux-kernel@vger.kernel.org Cc: linux-perf-users@vger.kernel.org, Michael Jeanson , Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Derek Foreman , Ian Rogers , Ingo Molnar , James Clark , Jiri Olsa , Mark Rutland , Mathieu Desnoyers , Namhyung Kim , Peter Zijlstra Subject: [PATCH v3] perf data ctf: replace libbabeltrace with babeltrace2-ctf-writer Date: Wed, 20 May 2026 15:14:50 -0400 Message-ID: <20260520191452.218717-1-mjeanson@efficios.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260512194710.162215-1-mjeanson@efficios.com> References: <20260512194710.162215-1-mjeanson@efficios.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Derek Foreman Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Namhyung Kim Cc: Peter Zijlstra Reviewed-by: Ian Rogers --- Changes since v2: * Revert babeltrace 1 fallback * Rebase on perf-tools-next Changes since v1: * Keep babeltrace 1 support as fallback --- tools/build/Makefile.feature | 5 +-- tools/build/feature/Makefile | 6 ++-- tools/build/feature/test-all.c | 6 ++-- ...ltrace.c =3D> test-babeltrace2-ctf-writer.c} | 3 +- tools/perf/Makefile.config | 27 +++++++-------- tools/perf/Makefile.perf | 2 +- tools/perf/builtin-check.c | 2 +- tools/perf/builtin-data.c | 18 +++------- tools/perf/tests/make | 4 +-- .../shell/test_perf_data_converter_ctf.sh | 8 ++--- tools/perf/util/Build | 2 +- tools/perf/util/data-convert-bt.c | 33 +++++++++---------- tools/perf/util/data-convert.h | 4 +-- 13 files changed, 53 insertions(+), 67 deletions(-) rename tools/build/feature/{test-libbabeltrace.c =3D> test-babeltrace2-ctf= -writer.c} (59%) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 0b7a7c38cb88..9e097144817e 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -113,7 +113,7 @@ FEATURE_TESTS_EXTRA :=3D \ gtk2 \ gtk2-infobar \ hello \ - libbabeltrace \ + babeltrace2-ctf-writer \ libcapstone \ libbfd-liberty \ libbfd-liberty-z \ @@ -162,6 +162,7 @@ FEATURE_GROUP_MEMBERS-libbfd =3D libbfd-liberty libbfd-= liberty-z # Declare list of feature dependency packages that provide pkg-config file= s. # FEATURE_PKG_CONFIG ?=3D \ + babeltrace2-ctf-writer \ libtraceevent \ libtracefs =20 @@ -208,7 +209,7 @@ ifeq ($(feature-all), 1) $(call feature_check,compile-32) $(call feature_check,compile-x32) $(call feature_check,bionic) - $(call feature_check,libbabeltrace) + $(call feature_check,babeltrace2-ctf-writer) else $(foreach feat,$(FEATURE_TESTS),$(call feature_check,$(feat))) endif diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index 1fbcb3ce74d2..7735e257c263 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -48,7 +48,7 @@ FILES=3D \ test-pthread-barrier.bin \ test-stackprotector-all.bin \ test-timerfd.bin \ - test-libbabeltrace.bin \ + test-babeltrace2-ctf-writer.bin \ test-libcapstone.bin \ test-compile-32.bin \ test-compile-x32.bin \ @@ -301,8 +301,8 @@ $(OUTPUT)test-backtrace.bin: $(OUTPUT)test-timerfd.bin: $(BUILD) =20 -$(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-b= abeltrace2-ctf-writer) =20 $(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 @@ =20 # 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. */ =20 -#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 =20 diff --git a/tools/build/feature/test-libbabeltrace.c b/tools/build/feature= /test-babeltrace2-ctf-writer.c similarity index 59% rename from tools/build/feature/test-libbabeltrace.c rename to 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 =20 -#include -#include +#include =20 int main(void) { diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index a8dc72cfe48e..856d2831d53c 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -195,14 +195,11 @@ endif FEATURE_CHECK_CFLAGS-libdw :=3D $(LIBDW_CFLAGS) FEATURE_CHECK_LDFLAGS-libdw :=3D $(LIBDW_LDFLAGS) $(DWARFLIBS) =20 -# for linking with debug library, run like: -# make DEBUG=3D1 LIBBABELTRACE_DIR=3D/opt/libbabeltrace/ -ifdef LIBBABELTRACE_DIR - LIBBABELTRACE_CFLAGS :=3D -I$(LIBBABELTRACE_DIR)/include - LIBBABELTRACE_LDFLAGS :=3D -L$(LIBBABELTRACE_DIR)/lib +ifneq ($(NO_BABELTRACE2),1) + ifeq ($(call get-executable,$(PKG_CONFIG)),) + $(error Error: $(PKG_CONFIG) needed by babeltrace2 is missing on this = system, please install it) + endif endif -FEATURE_CHECK_CFLAGS-libbabeltrace :=3D $(LIBBABELTRACE_CFLAGS) -FEATURE_CHECK_LDFLAGS-libbabeltrace :=3D $(LIBBABELTRACE_LDFLAGS) -lbabelt= race-ctf =20 # for linking with debug library, run like: # make DEBUG=3D1 LIBCAPSTONE_DIR=3D/opt/capstone/ @@ -1058,15 +1055,15 @@ else NO_PERF_READ_VDSOX32 :=3D 1 endif =20 -ifndef NO_LIBBABELTRACE - $(call feature_check,libbabeltrace) - ifeq ($(feature-libbabeltrace), 1) - CFLAGS +=3D -DHAVE_LIBBABELTRACE_SUPPORT $(LIBBABELTRACE_CFLAGS) - LDFLAGS +=3D $(LIBBABELTRACE_LDFLAGS) - EXTLIBS +=3D -lbabeltrace-ctf - $(call detected,CONFIG_LIBBABELTRACE) +ifndef NO_BABELTRACE2 + $(call feature_check,babeltrace2-ctf-writer) + ifeq ($(feature-babeltrace2-ctf-writer), 1) + CFLAGS +=3D -DHAVE_BABELTRACE2_CTF_WRITER_SUPPORT $(shell $(PKG_CONFIG= ) --cflags babeltrace2-ctf-writer) + LDFLAGS +=3D $(shell $(PKG_CONFIG) --libs-only-L babeltrace2-ctf-write= r) + EXTLIBS +=3D $(shell $(PKG_CONFIG) --libs-only-l babeltrace2-ctf-write= r) + $(call detected,CONFIG_BABELTRACE2_CTF_WRITER) else - $(warning No libbabeltrace found, disables 'perf data' CTF format supp= ort, please install libbabeltrace-dev[el]/libbabeltrace-ctf-dev) + $(warning No babeltrace2 found, disables 'perf data' CTF format suppor= t, please install libbabeltrace2-dev[el]) endif endif =20 diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 11b63bafdb23..ea830c07b952 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -79,7 +79,7 @@ include ../scripts/utilities.mak # # Define NO_ZLIB if you do not want to support compressed kernel modules # -# Define NO_LIBBABELTRACE if you do not want libbabeltrace support +# Define NO_BABELTRACE2 if you do not want babeltrace2-ctf-writer support # for CTF data format. # # Define NO_CAPSTONE if you do not want libcapstone support diff --git a/tools/perf/builtin-check.c b/tools/perf/builtin-check.c index 3641d263b345..60437650c50f 100644 --- a/tools/perf/builtin-check.c +++ b/tools/perf/builtin-check.c @@ -43,7 +43,7 @@ struct feature_status supported_features[] =3D { FEATURE_STATUS("dwarf_getlocations", HAVE_LIBDW_SUPPORT), FEATURE_STATUS("dwarf-unwind", HAVE_DWARF_UNWIND_SUPPORT), FEATURE_STATUS_TIP("libbfd", HAVE_LIBBFD_SUPPORT, "Deprecated, license in= compatibility, use BUILD_NONDISTRO=3D1 and install binutils-dev[el]"), - FEATURE_STATUS("libbabeltrace", HAVE_LIBBABELTRACE_SUPPORT), + FEATURE_STATUS("babeltrace2-ctf-writer", HAVE_BABELTRACE2_CTF_WRITER_SUPP= ORT), FEATURE_STATUS("libbpf-strings", HAVE_LIBBPF_STRINGS_SUPPORT), FEATURE_STATUS("libcapstone", HAVE_LIBCAPSTONE_SUPPORT), FEATURE_STATUS("libdw-dwarf-unwind", HAVE_LIBDW_SUPPORT), diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c index 85f59886b5cf..d4fdb0d97a29 100644 --- a/tools/perf/builtin-data.c +++ b/tools/perf/builtin-data.c @@ -40,10 +40,8 @@ const struct option data_options[] =3D { OPT_INCR('v', "verbose", &verbose, "be more verbose"), OPT_STRING('i', "input", &input_name, "file", "input file name"), OPT_STRING(0, "to-json", &to_json, NULL, "Convert to JSON format"), -#ifdef HAVE_LIBBABELTRACE_SUPPORT OPT_STRING(0, "to-ctf", &to_ctf, NULL, "Convert to CTF format"), OPT_BOOLEAN(0, "tod", &opts.tod, "Convert time to wall clock time"), -#endif OPT_BOOLEAN('f', "force", &opts.force, "don't complain, do it"), OPT_BOOLEAN(0, "all", &opts.all, "Convert all events"), OPT_STRING(0, "time", &opts.time_str, "str", @@ -65,29 +63,21 @@ static int cmd_data_convert(int argc, const char **argv) pr_err("You cannot specify both --to-ctf and --to-json.\n"); return -1; } -#ifdef HAVE_LIBBABELTRACE_SUPPORT if (!to_json && !to_ctf) { pr_err("You must specify one of --to-ctf or --to-json.\n"); return -1; } -#else - if (!to_json) { - pr_err("You must specify --to-json.\n"); - return -1; -} -#endif =20 if (to_json) return bt_convert__perf2json(input_name, to_json, &opts); =20 if (to_ctf) { -#if defined(HAVE_LIBBABELTRACE_SUPPORT) && defined(HAVE_LIBTRACEEVENT) +#if defined(HAVE_BABELTRACE2_CTF_WRITER_SUPPORT) && defined(HAVE_LIBTRACEE= VENT) return bt_convert__perf2ctf(input_name, to_ctf, &opts); #else - pr_err("The libbabeltrace support is not compiled in. perf should be " - "compiled with environment variables LIBBABELTRACE=3D1 and " - "LIBBABELTRACE_DIR=3D/path/to/libbabeltrace/.\n" - "Check also if libbtraceevent devel files are available.\n"); + pr_err("The babeltrace2 ctf support is not compiled in. Ensure you have = both\n" + "libbabeltrace2-dev[el] and libtraceevent-dev[el] installed or set\n" + "PKG_CONFIG_PATH to find a local installation of those libraries.\n"); return -1; #endif } diff --git a/tools/perf/tests/make b/tools/perf/tests/make index 6587dc326d1b..cc0138fa6d67 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -93,7 +93,7 @@ make_no_libbpf :=3D NO_LIBBPF=3D1 make_libbpf_dynamic :=3D LIBBPF_DYNAMIC=3D1 make_no_libbpf_DEBUG :=3D NO_LIBBPF=3D1 DEBUG=3D1 make_no_libllvm :=3D NO_LIBLLVM=3D1 -make_with_babeltrace:=3D LIBBABELTRACE=3D1 +make_no_babeltrace2 :=3D NO_BABELTRACE2=3D1 make_with_coresight :=3D CORESIGHT=3D1 make_no_sdt :=3D NO_SDT=3D1 make_no_libpfm4 :=3D NO_LIBPFM4=3D1 @@ -170,7 +170,7 @@ run +=3D make_no_libbpf_DEBUG run +=3D make_no_libllvm run +=3D make_no_sdt run +=3D make_no_syscall_tbl -run +=3D make_with_babeltrace +run +=3D make_no_babeltrace2 run +=3D make_with_coresight run +=3D make_with_clangllvm run +=3D make_no_libpfm4 diff --git a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh b/tools= /perf/tests/shell/test_perf_data_converter_ctf.sh index 334eebc9945e..bc58a8dabf4c 100755 --- a/tools/perf/tests/shell/test_perf_data_converter_ctf.sh +++ b/tools/perf/tests/shell/test_perf_data_converter_ctf.sh @@ -24,11 +24,11 @@ trap_cleanup() } trap trap_cleanup exit term int =20 -check_babeltrace_support() +check_babeltrace2_support() { - if ! perf check feature libbabeltrace + if ! perf check feature babeltrace2-ctf-writer then - echo "perf not linked with libbabeltrace, skipping test" + echo "perf not linked with babeltrace2-ctf-writer, skipping test" exit 2 fi } @@ -97,7 +97,7 @@ test_ctf_converter_pipe() fi } =20 -check_babeltrace_support +check_babeltrace2_support test_ctf_converter_file test_ctf_converter_pipe =20 diff --git a/tools/perf/util/Build b/tools/perf/util/Build index bcccad7487a9..782f208cf30f 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -233,7 +233,7 @@ perf-util-$(CONFIG_LIBUNWIND_X86) +=3D libunwind/x= 86_32.o perf-util-$(CONFIG_LIBUNWIND_AARCH64) +=3D libunwind/arm64.o =20 ifeq ($(CONFIG_LIBTRACEEVENT),y) - perf-util-$(CONFIG_LIBBABELTRACE) +=3D data-convert-bt.o + perf-util-$(CONFIG_BABELTRACE2_CTF_WRITER) +=3D data-convert-bt.o endif =20 perf-util-y +=3D data-convert-json.o diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-conve= rt-bt.c index ba1c8e48d495..91d8cdc9e8c7 100644 --- a/tools/perf/util/data-convert-bt.c +++ b/tools/perf/util/data-convert-bt.c @@ -11,14 +11,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "asm/bug.h" #include "data-convert.h" #include "session.h" @@ -121,13 +120,13 @@ static int value_set(struct bt_ctf_field_type *type, } =20 if (sign) { - ret =3D bt_ctf_field_signed_integer_set_value(field, val); + ret =3D bt_ctf_field_integer_signed_set_value(field, val); if (ret) { pr_err("failed to set field value %s\n", name); goto err; } } else { - ret =3D bt_ctf_field_unsigned_integer_set_value(field, val); + ret =3D bt_ctf_field_integer_unsigned_set_value(field, val); if (ret) { pr_err("failed to set field value %s\n", name); goto err; @@ -374,10 +373,10 @@ static int add_tracepoint_field_value(struct ctf_writ= er *cw, data + offset + i * len, len); =20 if (!(flags & TEP_FIELD_IS_SIGNED)) - ret =3D bt_ctf_field_unsigned_integer_set_value( + ret =3D bt_ctf_field_integer_unsigned_set_value( field, value_int); else - ret =3D bt_ctf_field_signed_integer_set_value( + ret =3D bt_ctf_field_integer_signed_set_value( field, adjust_signedness(value_int, len)); } =20 @@ -471,7 +470,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_= class, goto put_len_type; } =20 - ret =3D bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements); + ret =3D bt_ctf_field_integer_unsigned_set_value(len_field, nr_elements); if (ret) { pr_err("failed to set field value for raw_len\n"); goto put_len_field; @@ -500,7 +499,7 @@ add_bpf_output_values(struct bt_ctf_event_class *event_= class, struct bt_ctf_field *elem_field =3D bt_ctf_field_sequence_get_field(seq_field, i); =20 - ret =3D bt_ctf_field_unsigned_integer_set_value(elem_field, + ret =3D bt_ctf_field_integer_unsigned_set_value(elem_field, ((u32 *)(sample->raw_data))[i]); =20 bt_ctf_field_put(elem_field); @@ -545,7 +544,7 @@ add_callchain_output_values(struct bt_ctf_event_class *= event_class, goto put_len_type; } =20 - ret =3D bt_ctf_field_unsigned_integer_set_value(len_field, nr_elements); + ret =3D bt_ctf_field_integer_unsigned_set_value(len_field, nr_elements); if (ret) { pr_err("failed to set field value for perf_callchain_size\n"); goto put_len_field; @@ -575,7 +574,7 @@ add_callchain_output_values(struct bt_ctf_event_class *= event_class, struct bt_ctf_field *elem_field =3D bt_ctf_field_sequence_get_field(seq_field, i); =20 - ret =3D bt_ctf_field_unsigned_integer_set_value(elem_field, + ret =3D bt_ctf_field_integer_unsigned_set_value(elem_field, ((u64 *)(callchain->ips))[i]); =20 bt_ctf_field_put(elem_field); @@ -728,7 +727,7 @@ static struct ctf_stream *ctf_stream__create(struct ctf= _writer *cw, int cpu) goto out; } =20 - ret =3D bt_ctf_field_unsigned_integer_set_value(cpu_field, (u32) cpu); + ret =3D bt_ctf_field_integer_unsigned_set_value(cpu_field, (u32) cpu); if (ret) { pr_err("Failed to update CPU number\n"); goto out; diff --git a/tools/perf/util/data-convert.h b/tools/perf/util/data-convert.h index ee651fa680a1..a96240f15671 100644 --- a/tools/perf/util/data-convert.h +++ b/tools/perf/util/data-convert.h @@ -11,10 +11,10 @@ struct perf_data_convert_opts { const char *time_str; }; =20 -#ifdef HAVE_LIBBABELTRACE_SUPPORT +#ifdef HAVE_BABELTRACE2_CTF_WRITER_SUPPORT int bt_convert__perf2ctf(const char *input_name, const char *to_ctf, struct perf_data_convert_opts *opts); -#endif /* HAVE_LIBBABELTRACE_SUPPORT */ +#endif /* HAVE_BABELTRACE2_CTF_WRITER_SUPPORT */ =20 int bt_convert__perf2json(const char *input_name, const char *to_ctf, struct perf_data_convert_opts *opts); --=20 2.47.3