aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-03-24 14:37:40 -0400
committerIngo Molnar <mingo@kernel.org>2017-03-24 14:37:40 -0400
commite3a6a62400520452fe39740dca90a1d0b94b8f92 (patch)
tree0339ad6ca5de37105e47d4fa0d3b082e091ccbb0 /tools/perf/util/annotate.c
parent267dd0a07eefbb37264fcfad984fffc8856898ad (diff)
parentbf874fcf9f2fed58510dc83abcee388cee2b427e (diff)
Merge tag 'perf-core-for-mingo-4.12-20170324' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Allow suppressing 'uncore_' when specifying PMU events (Andi Kleen) - Collapse identically named PMU events in 'perf stat', allow not merging it via --no-merge (Andi Kleen) Fixes: - Use more precise 'grep -v' to suppress unwanted 'objdump -dS' disassembly output to not ditch line:number lines needed by 'perf annotate --print-lines' logic (Taeung Song) Infrastructure changes: - SDT (Statically Defined Tracing)/uprobes_events arguments improvements (Alexis Berlemont, Ravi Bangoria) - Improvements for the handling of JSON described vendor events, including having an expression parser to calculate metrics from multiple vendor events (Andi Kleen) - Update Intel JSON vendor event files (Andi Kleen) - Restore error reporting in 'perf probe -d' when none of the events requested to be deleted exist. (Kefeng Wang) - Bump MAX_CMDLEN in 'perf probe' to match what the kernel accepts (Ravi Bangoria) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 273f21fa32b5..22cd1dbe724b 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1435,7 +1435,7 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
1435 snprintf(command, sizeof(command), 1435 snprintf(command, sizeof(command),
1436 "%s %s%s --start-address=0x%016" PRIx64 1436 "%s %s%s --start-address=0x%016" PRIx64
1437 " --stop-address=0x%016" PRIx64 1437 " --stop-address=0x%016" PRIx64
1438 " -l -d %s %s -C %s 2>/dev/null|grep -v %s|expand", 1438 " -l -d %s %s -C %s 2>/dev/null|grep -v %s:|expand",
1439 objdump_path ? objdump_path : "objdump", 1439 objdump_path ? objdump_path : "objdump",
1440 disassembler_style ? "-M " : "", 1440 disassembler_style ? "-M " : "",
1441 disassembler_style ? disassembler_style : "", 1441 disassembler_style ? disassembler_style : "",
@@ -1482,6 +1482,12 @@ int symbol__disassemble(struct symbol *sym, struct map *map, const char *arch_na
1482 1482
1483 nline = 0; 1483 nline = 0;
1484 while (!feof(file)) { 1484 while (!feof(file)) {
1485 /*
1486 * The source code line number (lineno) needs to be kept in
1487 * accross calls to symbol__parse_objdump_line(), so that it
1488 * can associate it with the instructions till the next one.
1489 * See disasm_line__new() and struct disasm_line::line_nr.
1490 */
1485 if (symbol__parse_objdump_line(sym, map, arch, file, privsize, 1491 if (symbol__parse_objdump_line(sym, map, arch, file, privsize,
1486 &lineno) < 0) 1492 &lineno) < 0)
1487 break; 1493 break;