From 3402ae0a2e05e05254960581ae53d99118e1e134 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Sun, 23 Jan 2022 11:18:48 -0800 Subject: perf tui: Only support --tui with slang Make the --tui command line flags dependent HAVE_SLANG_SUPPORT. This was reported as confusing in: https://lore.kernel.org/linux-perf-users/YevaTkzdXmFKdGpc@zx-spectrum.none/ Reported-by: xaizek Signed-off-by: Ian Rogers Tested-by: xaizek Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20220123191849.3655855-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-annotate.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tools/perf/builtin-annotate.c') diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 490bb9b8cf17..5e038d9bab05 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -46,7 +46,11 @@ struct perf_annotate { struct perf_tool tool; struct perf_session *session; struct annotation_options opts; - bool use_tui, use_stdio, use_stdio2, use_gtk; +#ifdef HAVE_SLANG_SUPPORT + bool use_tui; +#endif + bool use_stdio, use_stdio2; + bool use_gtk; bool skip_missing; bool has_br_stack; bool group_set; @@ -503,7 +507,9 @@ int cmd_annotate(int argc, const char **argv) OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, "dump raw trace in ASCII"), OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"), +#ifdef HAVE_SLANG_SUPPORT OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"), +#endif OPT_BOOLEAN(0, "stdio", &annotate.use_stdio, "Use the stdio interface"), OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"), OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux, @@ -624,8 +630,10 @@ int cmd_annotate(int argc, const char **argv) if (annotate.use_stdio || annotate.use_stdio2) use_browser = 0; +#ifdef HAVE_SLANG_SUPPORT else if (annotate.use_tui) use_browser = 1; +#endif else if (annotate.use_gtk) use_browser = 2; -- cgit v1.2.3