aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/tests/code-reading.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-24 10:49:50 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:06 -0300
commitf07a2d32b521a54635c8efeb0a3180b0afcf780a (patch)
tree45a1067acbe63042868ffd6ad920b657c2ed7f51 /tools/perf/tests/code-reading.c
parentperf map: Introduce map__has_symbols() (diff)
downloadwireguard-linux-f07a2d32b521a54635c8efeb0a3180b0afcf780a.tar.xz
wireguard-linux-f07a2d32b521a54635c8efeb0a3180b0afcf780a.zip
perf thread: Introduce thread__find_map()
Out of thread__find_add_map(..., MAP__FUNCTION, ...), idea here is to continue removing references to MAP__{FUNCTION,VARIABLE} ahead of getting both types of symbols in the same rbtree, as various places do two lookups, looking first at MAP__FUNCTION, then at MAP__VARIABLE. So thread__find_map() will eventually do just that, and 'struct symbol' will have the symbol type, for code that cares about that. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-q27xee34l4izpfau49w103s6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/code-reading.c')
-rw-r--r--tools/perf/tests/code-reading.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 99936352df4f..5b0a55499486 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -236,14 +236,14 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
pr_debug("Reading object code for memory address: %#"PRIx64"\n", addr);
- thread__find_addr_map(thread, cpumode, MAP__FUNCTION, addr, &al);
+ thread__find_map(thread, cpumode, addr, &al);
if (!al.map || !al.map->dso) {
if (cpumode == PERF_RECORD_MISC_HYPERVISOR) {
pr_debug("Hypervisor address can not be resolved - skipping\n");
return 0;
}
- pr_debug("thread__find_addr_map failed\n");
+ pr_debug("thread__find_map failed\n");
return -1;
}