aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2017-12-06 17:20:04 +0100
committerIngo Molnar <[email protected]>2017-12-06 17:20:04 +0100
commitc32909741fe93032705e6da29b564b8fec84f415 (patch)
tree5f82c3f5f1c573f304feeff7c8c5428200e696dd /tools/perf/util/annotate.c
parente4f57147e4893344d9088bebf174c053353daec5 (diff)
parent0b72d69a542873ee098867deeb37d27ad4629c64 (diff)
Merge tag 'perf-core-for-mingo-4.16-20171206' 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: - Improve build messages for files needed by Intel-PT, originally copied from the kernel sources, that drifted from its original (Adrian Hunter) - Allow computing 'perf stat' style metrics in 'perf script' (Andi Kleen) - Fix 'perf report -D' output for user metadata events (Arnaldo Carvalho de Melo) - Add feature test for pthread_barrier_t availability (Arnaldo Carvalho de Melo) - Allow again using x86's asm.h when building for the 'bpf' clang target, making some 'perf test' LLVM/BPF entries work again (Arnaldo Carvalho de Melo) - Use cpumaps in 'perf bench futex', eliminating some code duplication (Davidlohr Bueso) - Improve PMU infrastructure to support amp64's ThunderX2 implementation defined core events (Ganapatrao Kulkarni) - Add hint about how to add USDT probes for Node.js (Hansuk Hong) - s/390 needs -fPIC to be incrementally linked or linked to shared libraries (Hendrik Brueckner) - Use pthread_barrier to synch 'perf bench futex wake-parallel' waker threads (James Yang) - Fix up build in hardened environments, such as Fedora 27 (Jiri Olsa) - Add a tip about cacheline events in 'perf c2c' (Sangwon Hong) - Set browser mode right before setup_browser(), because we may have errors printed before that, which were getting lost (Seokho Song) - s390x doesn't support PERF_TYPE_BREAKPOINT, so disable 'perf test' cases 19 and 20 on s390x, that tests that feature (Thomas Richter) - Fix unnecessary memory allocation for s390x 'perf annotate' objdump parsing, which could lead to thousands of needless entries in the instruction handling array (Thomas Richter) - Fix objdump comment parsing for Intel mov dissassembly (Thomas Richter) - Clarify usage of 'overwrite' and 'backward' in the evlist/mmap code, removing the 'overwrite' parameter from several functions as it was always used it as 'false' (Wang Nan) - Fix 'perf record' backward recording, it wasn't doing what was expected: overwriting records when the ring buffer gets full (Wang Nan) - Use more flexible pattern matching for CPU identification for perf vendor event's mapfile.csv, removing the need for a new perf binary for a sligthly different chip revision that shares the same set of counters (William Cohen) Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 22ea7936d92f..facad1e279a8 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -322,6 +322,8 @@ static int comment__symbol(char *raw, char *comment, u64 *addrp, char **namep)
return 0;
*addrp = strtoull(comment, &endptr, 16);
+ if (endptr == comment)
+ return 0;
name = strchr(endptr, '<');
if (name == NULL)
return -1;
@@ -435,8 +437,8 @@ static int mov__parse(struct arch *arch, struct ins_operands *ops, struct map *m
return 0;
comment = ltrim(comment);
- comment__symbol(ops->source.raw, comment, &ops->source.addr, &ops->source.name);
- comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name);
+ comment__symbol(ops->source.raw, comment + 1, &ops->source.addr, &ops->source.name);
+ comment__symbol(ops->target.raw, comment + 1, &ops->target.addr, &ops->target.name);
return 0;
@@ -480,7 +482,7 @@ static int dec__parse(struct arch *arch __maybe_unused, struct ins_operands *ops
return 0;
comment = ltrim(comment);
- comment__symbol(ops->target.raw, comment, &ops->target.addr, &ops->target.name);
+ comment__symbol(ops->target.raw, comment + 1, &ops->target.addr, &ops->target.name);
return 0;
}