mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 06:14:39 +01:00
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 <[email protected]> Signed-off-by: Michael Jeanson <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Derek Foreman <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
23 lines
553 B
C
23 lines
553 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __DATA_CONVERT_H
|
|
#define __DATA_CONVERT_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct perf_data_convert_opts {
|
|
bool force;
|
|
bool all;
|
|
bool tod;
|
|
const char *time_str;
|
|
};
|
|
|
|
#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_BABELTRACE2_CTF_WRITER_SUPPORT */
|
|
|
|
int bt_convert__perf2json(const char *input_name, const char *to_ctf,
|
|
struct perf_data_convert_opts *opts);
|
|
|
|
#endif /* __DATA_CONVERT_H */
|