aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 01d36ba5405..119e996035c 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -16,6 +16,8 @@
16#include "annotate.h" 16#include "annotate.h"
17#include <pthread.h> 17#include <pthread.h>
18 18
19const char *disassembler_style;
20
19int symbol__annotate_init(struct map *map __used, struct symbol *sym) 21int symbol__annotate_init(struct map *map __used, struct symbol *sym)
20{ 22{
21 struct annotation *notes = symbol__annotation(sym); 23 struct annotation *notes = symbol__annotation(sym);
@@ -308,9 +310,12 @@ fallback:
308 } 310 }
309 err = -ENOENT; 311 err = -ENOENT;
310 dso->annotate_warned = 1; 312 dso->annotate_warned = 1;
311 pr_err("Can't annotate %s: No vmlinux file%s was found in the " 313 pr_err("Can't annotate %s:\n\n"
312 "path.\nPlease use 'perf buildid-cache -av vmlinux' or " 314 "No vmlinux file%s\nwas found in the path.\n\n"
313 "--vmlinux vmlinux.\n", 315 "Please use:\n\n"
316 " perf buildid-cache -av vmlinux\n\n"
317 "or:\n\n"
318 " --vmlinux vmlinux",
314 sym->name, build_id_msg ?: ""); 319 sym->name, build_id_msg ?: "");
315 goto out_free_filename; 320 goto out_free_filename;
316 } 321 }
@@ -323,9 +328,11 @@ fallback:
323 dso, dso->long_name, sym, sym->name); 328 dso, dso->long_name, sym, sym->name);
324 329
325 snprintf(command, sizeof(command), 330 snprintf(command, sizeof(command),
326 "objdump --start-address=0x%016" PRIx64 331 "objdump %s%s --start-address=0x%016" PRIx64
327 " --stop-address=0x%016" PRIx64 332 " --stop-address=0x%016" PRIx64
328 " -d %s %s -C %s|grep -v %s|expand", 333 " -d %s %s -C %s|grep -v %s|expand",
334 disassembler_style ? "-M " : "",
335 disassembler_style ? disassembler_style : "",
329 map__rip_2objdump(map, sym->start), 336 map__rip_2objdump(map, sym->start),
330 map__rip_2objdump(map, sym->end), 337 map__rip_2objdump(map, sym->end),
331 symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", 338 symbol_conf.annotate_asm_raw ? "" : "--no-show-raw",