diff options
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 68e3a16abd3d..2e6961ea3184 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -37,6 +37,7 @@ struct perf_annotate { | |||
37 | bool force, use_tui, use_stdio, use_gtk; | 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 | bool skip_missing; | ||
40 | const char *sym_hist_filter; | 41 | const char *sym_hist_filter; |
41 | const char *cpu_list; | 42 | const char *cpu_list; |
42 | DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); | 43 | DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS); |
@@ -139,11 +140,21 @@ find_next: | |||
139 | } | 140 | } |
140 | 141 | ||
141 | if (use_browser == 2) { | 142 | if (use_browser == 2) { |
142 | hist_entry__gtk_annotate(he, evidx, NULL); | 143 | int ret; |
143 | return; | 144 | |
145 | ret = hist_entry__gtk_annotate(he, evidx, NULL); | ||
146 | if (!ret || !ann->skip_missing) | ||
147 | return; | ||
148 | |||
149 | /* skip missing symbols */ | ||
150 | nd = rb_next(nd); | ||
144 | } else if (use_browser == 1) { | 151 | } else if (use_browser == 1) { |
145 | key = hist_entry__tui_annotate(he, evidx, NULL); | 152 | key = hist_entry__tui_annotate(he, evidx, NULL); |
146 | switch (key) { | 153 | switch (key) { |
154 | case -1: | ||
155 | if (!ann->skip_missing) | ||
156 | return; | ||
157 | /* fall through */ | ||
147 | case K_RIGHT: | 158 | case K_RIGHT: |
148 | next = rb_next(nd); | 159 | next = rb_next(nd); |
149 | break; | 160 | break; |
@@ -288,6 +299,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused) | |||
288 | "print matching source lines (may be slow)"), | 299 | "print matching source lines (may be slow)"), |
289 | OPT_BOOLEAN('P', "full-paths", &annotate.full_paths, | 300 | OPT_BOOLEAN('P', "full-paths", &annotate.full_paths, |
290 | "Don't shorten the displayed pathnames"), | 301 | "Don't shorten the displayed pathnames"), |
302 | OPT_BOOLEAN(0, "skip-missing", &annotate.skip_missing, | ||
303 | "Skip symbols that cannot be annotated"), | ||
291 | OPT_STRING('C', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"), | 304 | OPT_STRING('C', "cpu", &annotate.cpu_list, "cpu", "list of cpus to profile"), |
292 | OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory", | 305 | OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory", |
293 | "Look for files with symbols relative to this directory"), | 306 | "Look for files with symbols relative to this directory"), |