mirror of https://github.com/torvalds/linux.git
Match linkage name with mangled name if exists. The linkage_name is used
for storing mangled name of the object.
Thus, this allows 'perf probe' to find appropriate probe point from
mangled symbol as below.
E.g. without this fix:
----
$ perf probe -x /usr/lib64/libstdc++.so.6 \
-D _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv
Probe point '_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv'
not found.
Error: Failed to add events.
----
With this fix, perf probe can find the correct one.
----
$ perf probe -x /usr/lib64/libstdc++.so.6 \
-D _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv
p:probe_libstdc/_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv
/usr/lib64/libstdc++.so.6.0.22:0x8ca60
----
Committer notes:
After the fix, setting it for real (no -D/--definition, that amounts to
a --dry-run):
# perf probe -x /usr/lib64/libstdc++.so.6 _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv
Added new event:
probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv (on _ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv in /usr/lib64/libstdc++.so.6.0.22)
You can now use it in all perf tools, such as:
perf record -e probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv -aR sleep 1
# perf probe -l probe_libstdc:*
probe_libstdc:_ZNKSt15basic_fstreamXXIwSt11char_traitsIwEE7is_openEv (on is_open@libstdc++-v3/include/fstream in /usr/lib64/libstdc++.so.6.0.22)
#
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/147464493162.29804.16715053505069382443.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||
|---|---|---|
| .. | ||
| include | ||
| intel-pt-decoder | ||
| libunwind | ||
| scripting-engines | ||
| Build | ||
| PERF-VERSION-GEN | ||
| alias.c | ||
| annotate.c | ||
| annotate.h | ||
| auxtrace.c | ||
| auxtrace.h | ||
| block-range.c | ||
| block-range.h | ||
| bpf-loader.c | ||
| bpf-loader.h | ||
| bpf-prologue.c | ||
| bpf-prologue.h | ||
| build-id.c | ||
| build-id.h | ||
| cache.h | ||
| call-path.c | ||
| call-path.h | ||
| callchain.c | ||
| callchain.h | ||
| cgroup.c | ||
| cgroup.h | ||
| cloexec.c | ||
| cloexec.h | ||
| color.c | ||
| color.h | ||
| comm.c | ||
| comm.h | ||
| config.c | ||
| config.h | ||
| counts.c | ||
| counts.h | ||
| cpumap.c | ||
| cpumap.h | ||
| cs-etm.h | ||
| ctype.c | ||
| data-convert-bt.c | ||
| data-convert-bt.h | ||
| data-convert.h | ||
| data.c | ||
| data.h | ||
| db-export.c | ||
| db-export.h | ||
| debug.c | ||
| debug.h | ||
| demangle-java.c | ||
| demangle-java.h | ||
| demangle-rust.c | ||
| demangle-rust.h | ||
| drv_configs.c | ||
| drv_configs.h | ||
| dso.c | ||
| dso.h | ||
| dwarf-aux.c | ||
| dwarf-aux.h | ||
| dwarf-regs.c | ||
| env.c | ||
| env.h | ||
| event.c | ||
| event.h | ||
| evlist.c | ||
| evlist.h | ||
| evsel.c | ||
| evsel.h | ||
| evsel_fprintf.c | ||
| find-vdso-map.c | ||
| genelf.c | ||
| genelf.h | ||
| genelf_debug.c | ||
| generate-cmdlist.sh | ||
| group.h | ||
| header.c | ||
| header.h | ||
| help-unknown-cmd.c | ||
| help-unknown-cmd.h | ||
| hist.c | ||
| hist.h | ||
| intel-bts.c | ||
| intel-bts.h | ||
| intel-pt.c | ||
| intel-pt.h | ||
| intlist.c | ||
| intlist.h | ||
| jit.h | ||
| jitdump.c | ||
| jitdump.h | ||
| kvm-stat.h | ||
| levenshtein.c | ||
| levenshtein.h | ||
| llvm-utils.c | ||
| llvm-utils.h | ||
| lzma.c | ||
| machine.c | ||
| machine.h | ||
| map.c | ||
| map.h | ||
| mem-events.c | ||
| mem-events.h | ||
| ordered-events.c | ||
| ordered-events.h | ||
| parse-branch-options.c | ||
| parse-branch-options.h | ||
| parse-events.c | ||
| parse-events.h | ||
| parse-events.l | ||
| parse-events.y | ||
| parse-regs-options.c | ||
| parse-regs-options.h | ||
| path.c | ||
| perf_regs.c | ||
| perf_regs.h | ||
| pmu.c | ||
| pmu.h | ||
| pmu.l | ||
| pmu.y | ||
| probe-event.c | ||
| probe-event.h | ||
| probe-file.c | ||
| probe-file.h | ||
| probe-finder.c | ||
| probe-finder.h | ||
| pstack.c | ||
| pstack.h | ||
| python-ext-sources | ||
| python.c | ||
| quote.c | ||
| quote.h | ||
| rb_resort.h | ||
| rblist.c | ||
| rblist.h | ||
| record.c | ||
| session.c | ||
| session.h | ||
| setup.py | ||
| sort.c | ||
| sort.h | ||
| srcline.c | ||
| stat-shadow.c | ||
| stat.c | ||
| stat.h | ||
| strbuf.c | ||
| strbuf.h | ||
| strfilter.c | ||
| strfilter.h | ||
| string.c | ||
| strlist.c | ||
| strlist.h | ||
| svghelper.c | ||
| svghelper.h | ||
| symbol-elf.c | ||
| symbol-minimal.c | ||
| symbol.c | ||
| symbol.h | ||
| symbol_fprintf.c | ||
| syscalltbl.c | ||
| syscalltbl.h | ||
| target.c | ||
| target.h | ||
| term.c | ||
| term.h | ||
| thread-stack.c | ||
| thread-stack.h | ||
| thread.c | ||
| thread.h | ||
| thread_map.c | ||
| thread_map.h | ||
| tool.h | ||
| top.c | ||
| top.h | ||
| trace-event-info.c | ||
| trace-event-parse.c | ||
| trace-event-read.c | ||
| trace-event-scripting.c | ||
| trace-event.c | ||
| trace-event.h | ||
| trigger.h | ||
| tsc.c | ||
| tsc.h | ||
| unwind-libdw.c | ||
| unwind-libdw.h | ||
| unwind-libunwind-local.c | ||
| unwind-libunwind.c | ||
| unwind.h | ||
| usage.c | ||
| util.c | ||
| util.h | ||
| values.c | ||
| values.h | ||
| vdso.c | ||
| vdso.h | ||
| xyarray.c | ||
| xyarray.h | ||
| zlib.c | ||