mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
perf gtk: Only support --gtk if compiled in
If HAVE_GTK2_SUPPORT isn't defined then --gtk can't succeed, don't support it as a command line option in this case. v2. Is a rebase. Patch appears to have been missed in: https://lore.kernel.org/lkml/Ygu40djM1MqAfkcF@kernel.org/ Signed-off-by: Ian Rogers <irogers@google.com> Cc: Stephane Eranian <eranian@google.com> Cc: xaizek <xaizek@posteo.net> Link: https://lore.kernel.org/r/20220707203836.345918-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
2f1d6b41e2
commit
557cc18ee7
@@ -50,7 +50,9 @@ struct perf_annotate {
|
||||
bool use_tui;
|
||||
#endif
|
||||
bool use_stdio, use_stdio2;
|
||||
#ifdef HAVE_GTK2_SUPPORT
|
||||
bool use_gtk;
|
||||
#endif
|
||||
bool skip_missing;
|
||||
bool has_br_stack;
|
||||
bool group_set;
|
||||
@@ -526,7 +528,9 @@ int cmd_annotate(int argc, const char **argv)
|
||||
OPT_BOOLEAN('q', "quiet", &quiet, "do now show any message"),
|
||||
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
|
||||
"dump raw trace in ASCII"),
|
||||
#ifdef HAVE_GTK2_SUPPORT
|
||||
OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
|
||||
#endif
|
||||
#ifdef HAVE_SLANG_SUPPORT
|
||||
OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"),
|
||||
#endif
|
||||
@@ -614,10 +618,12 @@ int cmd_annotate(int argc, const char **argv)
|
||||
if (annotate_check_args(&annotate.opts) < 0)
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef HAVE_GTK2_SUPPORT
|
||||
if (symbol_conf.show_nr_samples && annotate.use_gtk) {
|
||||
pr_err("--show-nr-samples is not available in --gtk mode at this time\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = symbol__validate_sym_arguments();
|
||||
if (ret)
|
||||
@@ -656,8 +662,10 @@ int cmd_annotate(int argc, const char **argv)
|
||||
else if (annotate.use_tui)
|
||||
use_browser = 1;
|
||||
#endif
|
||||
#ifdef HAVE_GTK2_SUPPORT
|
||||
else if (annotate.use_gtk)
|
||||
use_browser = 2;
|
||||
#endif
|
||||
|
||||
setup_browser(true);
|
||||
|
||||
|
Reference in New Issue
Block a user