diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-01-09 02:38:23 -0500 |
commit | da733563be5a9da26fe81d9f007262d00b846e22 (patch) | |
tree | db28291df94a2043af2123911984c5c173da4e6f /tools/perf/util/annotate.c | |
parent | 6ccbcf2cb41131f8d56ef0723bf3f7c1f8486076 (diff) | |
parent | dab78d7924598ea4031663dd10db814e2e324928 (diff) |
Merge branch 'next' into for-linus
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index e01af2b1a469..119e996035c8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include "annotate.h" | 16 | #include "annotate.h" |
17 | #include <pthread.h> | 17 | #include <pthread.h> |
18 | 18 | ||
19 | const char *disassembler_style; | ||
20 | |||
19 | int symbol__annotate_init(struct map *map __used, struct symbol *sym) | 21 | int symbol__annotate_init(struct map *map __used, struct symbol *sym) |
20 | { | 22 | { |
21 | struct annotation *notes = symbol__annotation(sym); | 23 | struct annotation *notes = symbol__annotation(sym); |
@@ -308,9 +310,12 @@ fallback: | |||
308 | } | 310 | } |
309 | err = -ENOENT; | 311 | err = -ENOENT; |
310 | dso->annotate_warned = 1; | 312 | dso->annotate_warned = 1; |
311 | pr_err("Can't annotate %s: No vmlinux file%s was found in the " | 313 | pr_err("Can't annotate %s:\n\n" |
312 | "path.\nPlease use 'perf buildid-cache -av vmlinux' or " | 314 | "No vmlinux file%s\nwas found in the path.\n\n" |
313 | "--vmlinux vmlinux.\n", | 315 | "Please use:\n\n" |
316 | " perf buildid-cache -av vmlinux\n\n" | ||
317 | "or:\n\n" | ||
318 | " --vmlinux vmlinux", | ||
314 | sym->name, build_id_msg ?: ""); | 319 | sym->name, build_id_msg ?: ""); |
315 | goto out_free_filename; | 320 | goto out_free_filename; |
316 | } | 321 | } |
@@ -323,10 +328,15 @@ fallback: | |||
323 | dso, dso->long_name, sym, sym->name); | 328 | dso, dso->long_name, sym, sym->name); |
324 | 329 | ||
325 | snprintf(command, sizeof(command), | 330 | snprintf(command, sizeof(command), |
326 | "objdump --start-address=0x%016" PRIx64 | 331 | "objdump %s%s --start-address=0x%016" PRIx64 |
327 | " --stop-address=0x%016" PRIx64 " -dS -C %s|grep -v %s|expand", | 332 | " --stop-address=0x%016" PRIx64 |
333 | " -d %s %s -C %s|grep -v %s|expand", | ||
334 | disassembler_style ? "-M " : "", | ||
335 | disassembler_style ? disassembler_style : "", | ||
328 | map__rip_2objdump(map, sym->start), | 336 | map__rip_2objdump(map, sym->start), |
329 | map__rip_2objdump(map, sym->end), | 337 | map__rip_2objdump(map, sym->end), |
338 | symbol_conf.annotate_asm_raw ? "" : "--no-show-raw", | ||
339 | symbol_conf.annotate_src ? "-S" : "", | ||
330 | symfs_filename, filename); | 340 | symfs_filename, filename); |
331 | 341 | ||
332 | pr_debug("Executing: %s\n", command); | 342 | pr_debug("Executing: %s\n", command); |