Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323763
b: refs/heads/master
c: 7a4ec93
h: refs/heads/master
i:
  323761: 3038a86
  323759: c5ba90a
v: v3
  • Loading branch information
Maciek Borzecki authored and Arnaldo Carvalho de Melo committed Sep 5, 2012
1 parent db52afc commit deb6971
Show file tree
Hide file tree
Showing 7 changed files with 15 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: 60ff92f515a4efb36931f1b5b042332016e0f123
refs/heads/master: 7a4ec938857cf534270b23545495300fbac7f5de
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 @@ -85,6 +85,9 @@ OPTIONS
-M::
--disassembler-style=:: Set disassembler style for objdump.

--objdump=<path>::
Path to objdump binary.

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 @@ -168,6 +168,9 @@ OPTIONS
branch stacks and it will automatically switch to the branch view mode,
unless --no-branch-stack is used.

--objdump=<path>::
Path to objdump binary.

SEE ALSO
--------
linkperf:perf-stat[1], linkperf:perf-annotate[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 @@ -282,6 +282,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used)
"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_STRING(0, "objdump", &objdump_path, "path",
"objdump binary to use for disassembly and annotations"),
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 @@ -638,6 +638,8 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
"Show a column with the sum of periods"),
OPT_CALLBACK_NOOPT('b', "branch-stack", &sort__branch_mode, "",
"use branch records for histogram filling", parse_branch_mode),
OPT_STRING(0, "objdump", &objdump_path, "path",
"objdump binary to use for disassembly and annotations"),
OPT_END()
};

Expand Down
4 changes: 3 additions & 1 deletion trunk/tools/perf/util/annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <pthread.h>

const char *disassembler_style;
const char *objdump_path;

static struct ins *ins__find(const char *name);
static int disasm_line__parse(char *line, char **namep, char **rawp);
Expand Down Expand Up @@ -820,9 +821,10 @@ int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize)
dso, dso->long_name, sym, sym->name);

snprintf(command, sizeof(command),
"objdump %s%s --start-address=0x%016" PRIx64
"%s %s%s --start-address=0x%016" PRIx64
" --stop-address=0x%016" PRIx64
" -d %s %s -C %s|grep -v %s|expand",
objdump_path ? objdump_path : "objdump",
disassembler_style ? "-M " : "",
disassembler_style ? disassembler_style : "",
map__rip_2objdump(map, sym->start),
Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/annotate.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,6 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map, int evidx,
#endif

extern const char *disassembler_style;
extern const char *objdump_path;

#endif /* __PERF_ANNOTATE_H */

0 comments on commit deb6971

Please sign in to comment.