aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r--tools/perf/builtin-annotate.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 95a2ad3f043e..9d758c9611a5 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -34,7 +34,7 @@
34 34
35struct perf_annotate { 35struct perf_annotate {
36 struct perf_tool tool; 36 struct perf_tool tool;
37 bool force, use_tui, use_stdio; 37 bool force, use_tui, use_stdio, use_gtk;
38 bool full_paths; 38 bool full_paths;
39 bool print_line; 39 bool print_line;
40 const char *sym_hist_filter; 40 const char *sym_hist_filter;
@@ -138,7 +138,10 @@ find_next:
138 continue; 138 continue;
139 } 139 }
140 140
141 if (use_browser > 0) { 141 if (use_browser == 2) {
142 hist_entry__gtk_annotate(he, evidx, NULL);
143 return;
144 } else if (use_browser == 1) {
142 key = hist_entry__tui_annotate(he, evidx, NULL); 145 key = hist_entry__tui_annotate(he, evidx, NULL);
143 switch (key) { 146 switch (key) {
144 case K_RIGHT: 147 case K_RIGHT:
@@ -270,6 +273,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
270 "be more verbose (show symbol address, etc)"), 273 "be more verbose (show symbol address, etc)"),
271 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, 274 OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
272 "dump raw trace in ASCII"), 275 "dump raw trace in ASCII"),
276 OPT_BOOLEAN(0, "gtk", &annotate.use_gtk, "Use the GTK interface"),
273 OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"), 277 OPT_BOOLEAN(0, "tui", &annotate.use_tui, "Use the TUI interface"),
274 OPT_BOOLEAN(0, "stdio", &annotate.use_stdio, "Use the stdio interface"), 278 OPT_BOOLEAN(0, "stdio", &annotate.use_stdio, "Use the stdio interface"),
275 OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, 279 OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
@@ -300,6 +304,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
300 use_browser = 0; 304 use_browser = 0;
301 else if (annotate.use_tui) 305 else if (annotate.use_tui)
302 use_browser = 1; 306 use_browser = 1;
307 else if (annotate.use_gtk)
308 use_browser = 2;
303 309
304 setup_browser(true); 310 setup_browser(true);
305 311