Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269022
b: refs/heads/master
c: f69b64f
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Arnaldo Carvalho de Melo committed Sep 29, 2011
1 parent a9acbd5 commit 2f119a8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 33e49ea70df066651a17061c62118fc3f075d21f
refs/heads/master: f69b64f73e1d7f47a9205c1cd46e0e1c3c65e1cd
3 changes: 3 additions & 0 deletions trunk/tools/perf/Documentation/perf-annotate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ OPTIONS
--symfs=<directory>::
Look for files with symbols relative to this directory.

-M::
--disassembler-style=:: Set disassembler style for objdump.

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-report[1]
3 changes: 3 additions & 0 deletions trunk/tools/perf/Documentation/perf-report.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ OPTIONS
CPUs are specified with -: 0-2. Default is to report samples on all
CPUs.

-M::
--disassembler-style=:: Set disassembler style for objdump.

SEE ALSO
--------
linkperf:perf-stat[1]
2 changes: 2 additions & 0 deletions trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ static const struct option options[] = {
"Interleave source code with assembly code (default)"),
OPT_BOOLEAN('0', "asm-raw", &symbol_conf.annotate_asm_raw,
"Display raw encoding of assembly instructions (default)"),
OPT_STRING('M', "disassembler-style", &disassembler_style, "disassembler style",
"Specify disassembler style (e.g. -M intel for intel syntax)"),
OPT_END()
};

Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ static const struct option options[] = {
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
"Look for files with symbols relative to this directory"),
OPT_STRING('c', "cpu", &cpu_list, "cpu", "list of cpus to profile"),
OPT_STRING('M', "disassembler-style", &disassembler_style, "disassembler style",
"Specify disassembler style (e.g. -M intel for intel syntax)"),
OPT_END()
};

Expand Down
6 changes: 5 additions & 1 deletion trunk/tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -323,9 +325,11 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
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",
Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/annotate.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
int refresh);
#endif

extern const char *disassembler_style;

#endif /* __PERF_ANNOTATE_H */

0 comments on commit 2f119a8

Please sign in to comment.