perf tests vmlinux-kallsyms: Use map__for_each_symbol() instead of open coded equivalent
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: d05b861e6da27ccb0d1b882f240890b0ed40adff Gitweb: https://git.kernel.org/tip/d05b861e6da27ccb0d1b882f240890b0ed40adff Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 25 Apr 2018 12:32:25 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 26 Apr 2018 13:47:12 -0300
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 <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/tests/vmlinux-kallsyms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/vmlinux-kallsyms.c +1 -1
@@ -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);