From 04dd17822334871b23ea2862f7798fb0e0007777 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 11 May 2024 08:53:19 +0000
Subject: [PATCH] change otg to host mode
---
kernel/tools/perf/arch/x86/util/event.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/kernel/tools/perf/arch/x86/util/event.c b/kernel/tools/perf/arch/x86/util/event.c
index 675a021..047dc00 100644
--- a/kernel/tools/perf/arch/x86/util/event.c
+++ b/kernel/tools/perf/arch/x86/util/event.c
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/types.h>
#include <linux/string.h>
+#include <linux/zalloc.h>
-#include "../../util/machine.h"
-#include "../../util/tool.h"
-#include "../../util/map.h"
-#include "../../util/util.h"
-#include "../../util/debug.h"
+#include "../../../util/event.h"
+#include "../../../util/synthetic-events.h"
+#include "../../../util/machine.h"
+#include "../../../util/tool.h"
+#include "../../../util/map.h"
+#include "../../../util/debug.h"
#if defined(__x86_64__)
@@ -16,8 +18,7 @@
{
int rc = 0;
struct map *pos;
- struct map_groups *kmaps = &machine->kmaps;
- struct maps *maps = &kmaps->maps;
+ struct maps *kmaps = &machine->kmaps;
union perf_event *event = zalloc(sizeof(event->mmap) +
machine->id_hdr_size);
@@ -27,7 +28,7 @@
return -1;
}
- for (pos = maps__first(maps); pos; pos = map__next(pos)) {
+ maps__for_each_entry(kmaps, pos) {
struct kmap *kmap;
size_t size;
--
Gitblit v1.6.2