[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 20/37] contrib/plugins/hotpages: fix 32-bit build
From: |
Alex Bennée |
Subject: |
[PATCH v2 20/37] contrib/plugins/hotpages: fix 32-bit build |
Date: |
Tue, 14 Jan 2025 11:38:04 +0000 |
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Message-Id: <20241217224306.2900490-11-pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
contrib/plugins/hotpages.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c
index 8316ae50c7..c6e6493719 100644
--- a/contrib/plugins/hotpages.c
+++ b/contrib/plugins/hotpages.c
@@ -103,7 +103,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p)
static void plugin_init(void)
{
page_mask = (page_size - 1);
- pages = g_hash_table_new(NULL, g_direct_equal);
+ pages = g_hash_table_new(g_int64_hash, g_int64_equal);
}
static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,
@@ -130,12 +130,12 @@ static void vcpu_haddr(unsigned int cpu_index,
qemu_plugin_meminfo_t meminfo,
page &= ~page_mask;
g_mutex_lock(&lock);
- count = (PageCounters *) g_hash_table_lookup(pages,
GUINT_TO_POINTER(page));
+ count = (PageCounters *) g_hash_table_lookup(pages, &page);
if (!count) {
count = g_new0(PageCounters, 1);
count->page_address = page;
- g_hash_table_insert(pages, GUINT_TO_POINTER(page), (gpointer) count);
+ g_hash_table_insert(pages, &count->page_address, count);
}
if (qemu_plugin_mem_is_store(meminfo)) {
count->writes++;
--
2.39.5
- [PATCH v2 29/37] include/exec: fix some copy and paste errors in kdoc, (continued)
- [PATCH v2 29/37] include/exec: fix some copy and paste errors in kdoc, Alex Bennée, 2025/01/14
- [PATCH v2 24/37] docs/devel/style: add a section about bitfield, and disallow them for packed structures, Alex Bennée, 2025/01/14
- [PATCH v2 21/37] configure: reenable plugins by default for 32-bit hosts, Alex Bennée, 2025/01/14
- [PATCH v2 32/37] docs/devel: add git-publish for patch submitting, Alex Bennée, 2025/01/14
- [PATCH v2 19/37] contrib/plugins/hwprofile: fix 32-bit build, Alex Bennée, 2025/01/14
- [PATCH v2 27/37] editorconfig: update for perl scripts, Alex Bennée, 2025/01/14
- [PATCH v2 31/37] docs/sphinx: include kernel-doc script as a dependency, Alex Bennée, 2025/01/14
- [PATCH v2 20/37] contrib/plugins/hotpages: fix 32-bit build,
Alex Bennée <=
- [PATCH v2 23/37] win32: remove usage of attribute gcc_struct, Alex Bennée, 2025/01/14
- [PATCH v2 30/37] include/exec: remove warning_printed from MemoryRegion, Alex Bennée, 2025/01/14
- [PATCH v2 22/37] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile, Alex Bennée, 2025/01/14