lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 2 May 2018 10:51:19 -0700
From:   tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org, acme@...hat.com, dsahern@...il.com,
        mingo@...nel.org, jolsa@...nel.org, wangnan0@...wei.com,
        adrian.hunter@...el.com, hpa@...or.com, namhyung@...nel.org,
        tglx@...utronix.de
Subject: [tip:perf/core] perf tests vmlinux-kallsyms: Use
 map__for_each_symbol() instead of open coded equivalent

Commit-ID:  d05b861e6da27ccb0d1b882f240890b0ed40adff
Gitweb:     https://git.kernel.org/tip/d05b861e6da27ccb0d1b882f240890b0ed40adff
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Wed, 25 Apr 2018 12:32:25 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
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 <adrian.hunter@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Wang Nan <wangnan0@...wei.com>
Link: https://lkml.kernel.org/n/tip-iswqjy1elghc5jjvr0nds3nc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/tests/vmlinux-kallsyms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ