diff options
| author | Andi Kleen <[email protected]> | 2011-09-15 21:31:41 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2011-09-29 20:10:00 +0000 |
| commit | f69b64f73e1d7f47a9205c1cd46e0e1c3c65e1cd (patch) | |
| tree | d524df90f8f78da2feebf63619101512d088a27c /tools/perf/util/annotate.c | |
| parent | perf tools: Make stat/record print fatal signals of the target program (diff) | |
| download | kernel-f69b64f73e1d7f47a9205c1cd46e0e1c3c65e1cd.tar.gz kernel-f69b64f73e1d7f47a9205c1cd46e0e1c3c65e1cd.zip | |
perf: Support setting the disassembler style
Add -M option to report/annotate to pass directly to objdump. This
allows to use -M intel for intel style disassembler syntax, which is
useful for people who are very used to the Intel syntax.
Link: http://lkml.kernel.org/r/[email protected]
[committer note: Add missing Documentation bits, fixup conflicts with 3e6a2a7]
Cc: Frederic Weisbecker <[email protected]>
Cc: Stephane Eranian <[email protected]>
Signed-off-by: Andi Kleen <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
| -rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 01d36ba54053..bc8f4773d4d8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -16,6 +16,8 @@ #include "annotate.h" #include <pthread.h> +const char *disassembler_style; + int symbol__annotate_init(struct map *map __used, struct symbol *sym) { struct annotation *notes = symbol__annotation(sym); @@ -323,9 +325,11 @@ fallback: dso, dso->long_name, sym, sym->name); snprintf(command, sizeof(command), - "objdump --start-address=0x%016" PRIx64 + "objdump %s%s --start-address=0x%016" PRIx64 " --stop-address=0x%016" PRIx64 " -d %s %s -C %s|grep -v %s|expand", + disassembler_style ? "-M " : "", + disassembler_style ? disassembler_style : "", map__rip_2objdump(map, sym->start), map__rip_2objdump(map, sym->end), symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", |
