mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
24e3599c5a
commit
3402ae0a2e
4 changed files with 26 additions and 3 deletions
|
@ -46,7 +46,11 @@ struct perf_annotate {
|
||||||
struct perf_tool tool;
|
struct perf_tool tool;
|
||||||
struct perf_session *session;
|
struct perf_session *session;
|
||||||
struct annotation_options opts;
|
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 skip_missing;
|
||||||
bool has_br_stack;
|
bool has_br_stack;
|
||||||
bool group_set;
|
bool group_set;
|
||||||
|
@ -503,7 +507,9 @@ int cmd_annotate(int argc, const char **argv)
|
||||||
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
|
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
|
||||||
"dump raw trace in ASCII"),
|
"dump raw trace in ASCII"),
|
||||||
OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
|
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"),
|
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, "stdio", &annotate.use_stdio, "Use the stdio interface"),
|
||||||
OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"),
|
OPT_BOOLEAN(0, "stdio2", &annotate.use_stdio2, "Use the stdio interface"),
|
||||||
OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux,
|
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)
|
if (annotate.use_stdio || annotate.use_stdio2)
|
||||||
use_browser = 0;
|
use_browser = 0;
|
||||||
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
else if (annotate.use_tui)
|
else if (annotate.use_tui)
|
||||||
use_browser = 1;
|
use_browser = 1;
|
||||||
|
#endif
|
||||||
else if (annotate.use_gtk)
|
else if (annotate.use_gtk)
|
||||||
use_browser = 2;
|
use_browser = 2;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,11 @@ struct report {
|
||||||
struct perf_tool tool;
|
struct perf_tool tool;
|
||||||
struct perf_session *session;
|
struct perf_session *session;
|
||||||
struct evswitch evswitch;
|
struct evswitch evswitch;
|
||||||
bool use_tui, use_gtk, use_stdio;
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
|
bool use_tui;
|
||||||
|
#endif
|
||||||
|
bool use_gtk;
|
||||||
|
bool use_stdio;
|
||||||
bool show_full_info;
|
bool show_full_info;
|
||||||
bool show_threads;
|
bool show_threads;
|
||||||
bool inverted_callchain;
|
bool inverted_callchain;
|
||||||
|
@ -1206,7 +1210,9 @@ int cmd_report(int argc, const char **argv)
|
||||||
"Show per-thread event counters"),
|
"Show per-thread event counters"),
|
||||||
OPT_STRING(0, "pretty", &report.pretty_printing_style, "key",
|
OPT_STRING(0, "pretty", &report.pretty_printing_style, "key",
|
||||||
"pretty printing style key: normal raw"),
|
"pretty printing style key: normal raw"),
|
||||||
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
OPT_BOOLEAN(0, "tui", &report.use_tui, "Use the TUI interface"),
|
OPT_BOOLEAN(0, "tui", &report.use_tui, "Use the TUI interface"),
|
||||||
|
#endif
|
||||||
OPT_BOOLEAN(0, "gtk", &report.use_gtk, "Use the GTK2 interface"),
|
OPT_BOOLEAN(0, "gtk", &report.use_gtk, "Use the GTK2 interface"),
|
||||||
OPT_BOOLEAN(0, "stdio", &report.use_stdio,
|
OPT_BOOLEAN(0, "stdio", &report.use_stdio,
|
||||||
"Use the stdio interface"),
|
"Use the stdio interface"),
|
||||||
|
@ -1492,8 +1498,10 @@ repeat:
|
||||||
|
|
||||||
if (report.use_stdio)
|
if (report.use_stdio)
|
||||||
use_browser = 0;
|
use_browser = 0;
|
||||||
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
else if (report.use_tui)
|
else if (report.use_tui)
|
||||||
use_browser = 1;
|
use_browser = 1;
|
||||||
|
#endif
|
||||||
else if (report.use_gtk)
|
else if (report.use_gtk)
|
||||||
use_browser = 2;
|
use_browser = 2;
|
||||||
|
|
||||||
|
|
|
@ -1486,7 +1486,9 @@ int cmd_top(int argc, const char **argv)
|
||||||
"display this many functions"),
|
"display this many functions"),
|
||||||
OPT_BOOLEAN('U', "hide_user_symbols", &top.hide_user_symbols,
|
OPT_BOOLEAN('U', "hide_user_symbols", &top.hide_user_symbols,
|
||||||
"hide user symbols"),
|
"hide user symbols"),
|
||||||
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
OPT_BOOLEAN(0, "tui", &top.use_tui, "Use the TUI interface"),
|
OPT_BOOLEAN(0, "tui", &top.use_tui, "Use the TUI interface"),
|
||||||
|
#endif
|
||||||
OPT_BOOLEAN(0, "stdio", &top.use_stdio, "Use the stdio interface"),
|
OPT_BOOLEAN(0, "stdio", &top.use_stdio, "Use the stdio interface"),
|
||||||
OPT_INCR('v', "verbose", &verbose,
|
OPT_INCR('v', "verbose", &verbose,
|
||||||
"be more verbose (show counter open errors, etc)"),
|
"be more verbose (show counter open errors, etc)"),
|
||||||
|
@ -1667,8 +1669,10 @@ int cmd_top(int argc, const char **argv)
|
||||||
|
|
||||||
if (top.use_stdio)
|
if (top.use_stdio)
|
||||||
use_browser = 0;
|
use_browser = 0;
|
||||||
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
else if (top.use_tui)
|
else if (top.use_tui)
|
||||||
use_browser = 1;
|
use_browser = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
setup_browser(false);
|
setup_browser(false);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,10 @@ struct perf_top {
|
||||||
int print_entries, count_filter, delay_secs;
|
int print_entries, count_filter, delay_secs;
|
||||||
int max_stack;
|
int max_stack;
|
||||||
bool hide_kernel_symbols, hide_user_symbols, zero;
|
bool hide_kernel_symbols, hide_user_symbols, zero;
|
||||||
bool use_tui, use_stdio;
|
#ifdef HAVE_SLANG_SUPPORT
|
||||||
|
bool use_tui;
|
||||||
|
#endif
|
||||||
|
bool use_stdio;
|
||||||
bool vmlinux_warned;
|
bool vmlinux_warned;
|
||||||
bool dump_symtab;
|
bool dump_symtab;
|
||||||
bool stitch_lbr;
|
bool stitch_lbr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue