mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-20 05:43:09 +00:00
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/1316122302-24306-2-git-send-email-andi@firstfloor.org
[committer note: Add missing Documentation bits, fixup conflicts with 3e6a2a7
]
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
33e49ea70d
commit
f69b64f73e
6 changed files with 17 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue