.. | .. |
---|
1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
---|
2 | 2 | #include <linux/types.h> |
---|
3 | 3 | #include <linux/string.h> |
---|
| 4 | +#include <linux/zalloc.h> |
---|
4 | 5 | |
---|
5 | | -#include "../../util/machine.h" |
---|
6 | | -#include "../../util/tool.h" |
---|
7 | | -#include "../../util/map.h" |
---|
8 | | -#include "../../util/util.h" |
---|
9 | | -#include "../../util/debug.h" |
---|
| 6 | +#include "../../../util/event.h" |
---|
| 7 | +#include "../../../util/synthetic-events.h" |
---|
| 8 | +#include "../../../util/machine.h" |
---|
| 9 | +#include "../../../util/tool.h" |
---|
| 10 | +#include "../../../util/map.h" |
---|
| 11 | +#include "../../../util/debug.h" |
---|
10 | 12 | |
---|
11 | 13 | #if defined(__x86_64__) |
---|
12 | 14 | |
---|
.. | .. |
---|
16 | 18 | { |
---|
17 | 19 | int rc = 0; |
---|
18 | 20 | struct map *pos; |
---|
19 | | - struct map_groups *kmaps = &machine->kmaps; |
---|
20 | | - struct maps *maps = &kmaps->maps; |
---|
| 21 | + struct maps *kmaps = &machine->kmaps; |
---|
21 | 22 | union perf_event *event = zalloc(sizeof(event->mmap) + |
---|
22 | 23 | machine->id_hdr_size); |
---|
23 | 24 | |
---|
.. | .. |
---|
27 | 28 | return -1; |
---|
28 | 29 | } |
---|
29 | 30 | |
---|
30 | | - for (pos = maps__first(maps); pos; pos = map__next(pos)) { |
---|
| 31 | + maps__for_each_entry(kmaps, pos) { |
---|
31 | 32 | struct kmap *kmap; |
---|
32 | 33 | size_t size; |
---|
33 | 34 | |
---|