diff options
author | Namhyung Kim <namhyung@kernel.org> | 2015-01-14 11:18:07 (GMT) |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-01-21 13:06:02 (GMT) |
commit | 564c62a4d7f9a4b60920ee0b02cfe890471d87f4 (patch) | |
tree | b19e154acf61fcd58bf509b689db587aa09d491d /tools/virtio | |
parent | 18bd726418f2a2e12f85104f0f4b5d5d077e1752 (diff) | |
download | linux-564c62a4d7f9a4b60920ee0b02cfe890471d87f4.tar.xz |
perf probe: Do not rely on map__load() filter to find symbols
The find_probe_trace_events_from_map() searches matching symbol from a
map (so from a backing dso). For uprobes, it'll create a new map (and
dso) and loads it using a filter. It's a little bit inefficient in that
it'll read out the symbol table everytime but works well anyway.
For kprobes however, it'll reuse existing kernel map which might be
loaded before. In this case map__load() just returns with no result.
It makes kprobes always failed to find symbol even if it exists in the
map (dso).
To fix it, use map__find_symbol_by_name() instead. It'll load a map
with full symbols and sorts them by name. It needs to search sibing
nodes since there can be multiple (local) symbols with same name.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/1421234288-22758-3-git-send-email-namhyung@kernel.org
[ Use symbol__next_by_name ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/virtio')
0 files changed, 0 insertions, 0 deletions