diff options
| author | Wang Nan <[email protected]> | 2015-05-15 12:14:44 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2015-05-18 10:16:48 -0300 |
| commit | 75e4a2a6af15e956993913314ced2582b350a647 (patch) | |
| tree | 0f3ae68446c50bd1e9756a55fb324003d98f73be /tools/perf/scripts/python/bin | |
| parent | 2f15bd8c6c6e80f15c899ea84b53fa607a2f08b2 (diff) | |
perf probe: Load map before glob matching
Commit 4c859351226c920b227fec040a3b447f0d482af3 ("perf probe: Support
glob wildcards for function name") introduces a problem:
# /root/perf probe kmem_cache_free
Failed to find symbol kmem_cache_free in kernel
Error: Failed to add events.
The reason is the replacement of map__for_each_symbol_by_name() (by
map__for_each_symbol()). Although their names are similar,
map__for_each_symbol doesn't call map__load() and dso__sort_by_name()
before searching. The missing of map__load() causes this problem because
it search symbol before load dso map.
This patch ensures map__load() is called before using
map__for_each_symbol().
After this patch:
# /root/perf probe kmem_cache_free
Added new event:
probe:kmem_cache_free (on kmem_cache_free%return)
You can now use it in all perf tools, such as:
perf record -e probe:kmem_cache_free -aR sleep 1
Signed-off-by: Wang Nan <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Zefan Li <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions