diff options
author | Ian Rogers <irogers@google.com> | 2022-07-07 22:38:36 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-07-20 16:09:11 +0200 |
commit | 557cc18ee7dc80b1de0c9f60de65ade92d2a134f (patch) | |
tree | 8d0ed52c1e3295f1df38501d2e347e11eabc2808 /tools/perf/builtin-report.c | |
parent | perf intel-pt: Add documentation for tracing guest machine user space (diff) | |
download | linux-557cc18ee7dc80b1de0c9f60de65ade92d2a134f.tar.xz linux-557cc18ee7dc80b1de0c9f60de65ade92d2a134f.zip |
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>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index afe4a5539ecc..91ed41cc7d88 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -74,7 +74,9 @@ struct report { #ifdef HAVE_SLANG_SUPPORT bool use_tui; #endif +#ifdef HAVE_GTK2_SUPPORT bool use_gtk; +#endif bool use_stdio; bool show_full_info; bool show_threads; @@ -1227,7 +1229,9 @@ int cmd_report(int argc, const char **argv) #ifdef HAVE_SLANG_SUPPORT OPT_BOOLEAN(0, "tui", &report.use_tui, "Use the TUI interface"), #endif +#ifdef HAVE_GTK2_SUPPORT OPT_BOOLEAN(0, "gtk", &report.use_gtk, "Use the GTK2 interface"), +#endif OPT_BOOLEAN(0, "stdio", &report.use_stdio, "Use the stdio interface"), OPT_BOOLEAN(0, "header", &report.header, "Show data header."), @@ -1516,8 +1520,10 @@ repeat: else if (report.use_tui) use_browser = 1; #endif +#ifdef HAVE_GTK2_SUPPORT else if (report.use_gtk) use_browser = 2; +#endif /* Force tty output for header output and per-thread stat. */ if (report.header || report.header_only || report.show_threads) |