aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-04-25 12:32:25 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-04-26 13:47:12 -0300
commitd05b861e6da27ccb0d1b882f240890b0ed40adff (patch)
tree4de668ddfc0e258eab801a33d7e2ab3f5e7bc9c9 /tools/perf
parentperf tests vmlinux-kallsyms: Use machine__find_kernel_function(_by_name) (diff)
downloadlinux-dev-d05b861e6da27ccb0d1b882f240890b0ed40adff.tar.xz
linux-dev-d05b861e6da27ccb0d1b882f240890b0ed40adff.zip
perf tests vmlinux-kallsyms: Use map__for_each_symbol() instead of open coded equivalent
We had this much shorter map__for_each_symbol() helper for ages, use it and kill one more map_type use outside the code, in the tools. 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-iswqjy1elghc5jjvr0nds3nc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/tests/vmlinux-kallsyms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/vmlinux-kallsyms.c b/tools/perf/tests/vmlinux-kallsyms.c
index c7f43afd5f89..a99b0c118541 100644
--- a/tools/perf/tests/vmlinux-kallsyms.c
+++ b/tools/perf/tests/vmlinux-kallsyms.c
@@ -108,7 +108,7 @@ int test__vmlinux_matches_kallsyms(struct test *test __maybe_unused, int subtest
* in the kallsyms dso. For the ones that are in both, check its names and
* end addresses too.
*/
- for (nd = rb_first(&vmlinux_map->dso->symbols[type]); nd; nd = rb_next(nd)) {
+ map__for_each_symbol(vmlinux_map, sym, nd) {
struct symbol *pair, *first_pair;
sym = rb_entry(nd, struct symbol, rb_node);