hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/tools/perf/arch/x86/util/event.c
....@@ -1,12 +1,14 @@
11 // SPDX-License-Identifier: GPL-2.0
22 #include <linux/types.h>
33 #include <linux/string.h>
4
+#include <linux/zalloc.h>
45
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"
1012
1113 #if defined(__x86_64__)
1214
....@@ -16,8 +18,7 @@
1618 {
1719 int rc = 0;
1820 struct map *pos;
19
- struct map_groups *kmaps = &machine->kmaps;
20
- struct maps *maps = &kmaps->maps;
21
+ struct maps *kmaps = &machine->kmaps;
2122 union perf_event *event = zalloc(sizeof(event->mmap) +
2223 machine->id_hdr_size);
2324
....@@ -27,7 +28,7 @@
2728 return -1;
2829 }
2930
30
- for (pos = maps__first(maps); pos; pos = map__next(pos)) {
31
+ maps__for_each_entry(kmaps, pos) {
3132 struct kmap *kmap;
3233 size_t size;
3334