Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288629
b: refs/heads/master
c: 0bc8d20
h: refs/heads/master
i:
  288627: 1101027
v: v3
  • Loading branch information
Akihiro Nagai authored and Arnaldo Carvalho de Melo committed Jan 30, 2012
1 parent cb468bb commit fe39743
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 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: a978f2ab4166a84c77d0f846f59690f2a892d058
refs/heads/master: 0bc8d20580af74c9a8a39c200e269261e5cded05
3 changes: 3 additions & 0 deletions trunk/tools/perf/Documentation/perf-script.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ OPTIONS
It currently includes: cpu and numa topology of the host system.
It can only be used with the perf script report mode.

--show-kernel-path::
Try to resolve the path of [kernel.kallsyms]

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-script-perl[1],
Expand Down
3 changes: 3 additions & 0 deletions trunk/tools/perf/builtin-script.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,9 @@ static const struct option options[] = {
"only display events for these comms"),
OPT_BOOLEAN('I', "show-info", &show_full_info,
"display extended information from perf.data file"),
OPT_BOOLEAN('\0', "show-kernel-path", &symbol_conf.show_kernel_path,
"Show the path of [kernel.kallsyms]"),

OPT_END()
};

Expand Down
9 changes: 6 additions & 3 deletions trunk/tools/perf/util/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,12 @@ size_t map__fprintf_dsoname(struct map *map, FILE *fp)
{
const char *dsoname;

if (map && map->dso && map->dso->name)
dsoname = map->dso->name;
else
if (map && map->dso && (map->dso->name || map->dso->long_name)) {
if (symbol_conf.show_kernel_path && map->dso->long_name)
dsoname = map->dso->long_name;
else if (map->dso->name)
dsoname = map->dso->name;
} else
dsoname = "[unknown]";

return fprintf(fp, "%s", dsoname);
Expand Down
1 change: 1 addition & 0 deletions trunk/tools/perf/util/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ struct symbol_conf {
unsigned short priv_size;
unsigned short nr_events;
bool try_vmlinux_path,
show_kernel_path,
use_modules,
sort_by_name,
show_nr_samples,
Expand Down

0 comments on commit fe39743

Please sign in to comment.