diff options
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index e01af2b1a469..bc8f4773d4d8 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 | ||
19 | const char *disassembler_style; | ||
20 | |||
19 | int symbol__annotate_init(struct map *map __used, struct symbol *sym) | 21 | int 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); |
@@ -323,10 +325,15 @@ fallback: | |||
323 | dso, dso->long_name, sym, sym->name); | 325 | dso, dso->long_name, sym, sym->name); |
324 | 326 | ||
325 | snprintf(command, sizeof(command), | 327 | snprintf(command, sizeof(command), |
326 | "objdump --start-address=0x%016" PRIx64 | 328 | "objdump %s%s --start-address=0x%016" PRIx64 |
327 | " --stop-address=0x%016" PRIx64 " -dS -C %s|grep -v %s|expand", | 329 | " --stop-address=0x%016" PRIx64 |
330 | " -d %s %s -C %s|grep -v %s|expand", | ||
331 | disassembler_style ? "-M " : "", | ||
332 | disassembler_style ? disassembler_style : "", | ||
328 | map__rip_2objdump(map, sym->start), | 333 | map__rip_2objdump(map, sym->start), |
329 | map__rip_2objdump(map, sym->end), | 334 | map__rip_2objdump(map, sym->end), |
335 | symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", | ||
336 | symbol_conf.annotate_src ? "-S" : "", | ||
330 | symfs_filename, filename); | 337 | symfs_filename, filename); |
331 | 338 | ||
332 | pr_debug("Executing: %s\n", command); | 339 | pr_debug("Executing: %s\n", command); |