diff options
author | Mahmoud Mandour <[email protected]> | 2022-02-20 13:39:52 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-02-22 21:23:08 -0300 |
commit | 8c4c7016ddd12d38cb4b88bcec235c2c67a35be0 (patch) | |
tree | 78961a5a20fa4efa1806a0f01264c2aaa46c22c5 | |
parent | 65e7c963267f128df155f496a50933cea7dfa5b8 (diff) |
perf data: Don't mention --to-ctf if it's not supported
The option `--to-ctf` is only available when perf has libbabeltrace
support. Hence, on error, we shouldn't state that user must include
`--to-ctf` unless it's supported.
The only user-visible change for this commit is that when `perf` is not
configured to support libbabeltrace, the user is only prompted to
provide the `--to-json` option instead of bothe `--to-json` and
`--to-ctf`.
Signed-off-by: Mahmoud Mandour <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-data.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c index b7f9dc85a407..c22d82d2a73c 100644 --- a/tools/perf/builtin-data.c +++ b/tools/perf/builtin-data.c @@ -62,10 +62,17 @@ 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 if (to_json) return bt_convert__perf2json(input_name, to_json, &opts); |