diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-10-28 17:55:28 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-06 21:49:39 +0300 |
commit | 50481461cfe937289724643691a752fa15a600c9 (patch) | |
tree | c7f583b209cc9ae5bf6e9fe0273e530c49c8a5e1 /tools/perf/util/vdso.c | |
parent | 8efc4f05685dae2da1d21973eba5e59e7863c77f (diff) | |
download | linux-50481461cfe937289724643691a752fa15a600c9.tar.xz |
perf map_groups: Introduce for_each_entry() and for_each_entry_safe() iterators
To reduce boilerplate, providing a more compact form to iterate over the
maps in a map_group.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-gc3go6fmdn30twusg91t2q56@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/vdso.c')
-rw-r--r-- | tools/perf/util/vdso.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/vdso.c b/tools/perf/util/vdso.c index ba4b4395f35d..6e00793c10ee 100644 --- a/tools/perf/util/vdso.c +++ b/tools/perf/util/vdso.c @@ -142,9 +142,9 @@ static enum dso_type machine__thread_dso_type(struct machine *machine, struct thread *thread) { enum dso_type dso_type = DSO__TYPE_UNKNOWN; - struct map *map = map_groups__first(thread->mg); + struct map *map; - for (; map ; map = map_groups__next(map)) { + map_groups__for_each_entry(thread->mg, map) { struct dso *dso = map->dso; if (!dso || dso->long_name[0] != '/') continue; |