summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-01-23 22:18:48 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-02-15 23:15:29 +0300
commit3402ae0a2e05e05254960581ae53d99118e1e134 (patch)
treeb11a641023e9a2671cbffa5b14ae2e307f3c5964 /tools/perf/builtin-top.c
parent24e3599c5a88e0e2995e3f5c9305f80195942dc9 (diff)
downloadlinux-3402ae0a2e05e05254960581ae53d99118e1e134.tar.xz
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 <xaizek@posteo.net> Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: xaizek <xaizek@posteo.net> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20220123191849.3655855-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 92b314fa7223..1e25aa0862bc 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1486,7 +1486,9 @@ int cmd_top(int argc, const char **argv)
"display this many functions"),
OPT_BOOLEAN('U', "hide_user_symbols", &top.hide_user_symbols,
"hide user symbols"),
+#ifdef HAVE_SLANG_SUPPORT
OPT_BOOLEAN(0, "tui", &top.use_tui, "Use the TUI interface"),
+#endif
OPT_BOOLEAN(0, "stdio", &top.use_stdio, "Use the stdio interface"),
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show counter open errors, etc)"),
@@ -1667,8 +1669,10 @@ int cmd_top(int argc, const char **argv)
if (top.use_stdio)
use_browser = 0;
+#ifdef HAVE_SLANG_SUPPORT
else if (top.use_tui)
use_browser = 1;
+#endif
setup_browser(false);