[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/37] contrib/plugins/hotpages: fix 32-bit build
From: |
Alex Bennée |
Subject: |
[PULL 20/37] contrib/plugins/hotpages: fix 32-bit build |
Date: |
Fri, 17 Jan 2025 13:42:39 +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>
Message-Id: <20250116160306.1709518-21-alex.bennee@linaro.org>
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
- [PULL 06/37] semihosting/console: Avoid including 'cpu.h', (continued)
- [PULL 06/37] semihosting/console: Avoid including 'cpu.h', Alex Bennée, 2025/01/17
- [PULL 09/37] system: squash usb_parse into a single function, Alex Bennée, 2025/01/17
- [PULL 22/37] accel/tcg: also suppress asynchronous IRQs for cpu_io_recompile, Alex Bennée, 2025/01/17
- [PULL 28/37] tests/qtest: fix some copy and paste errors in kdoc, Alex Bennée, 2025/01/17
- [PULL 33/37] docs/devel: add b4 for patch retrieval, Alex Bennée, 2025/01/17
- [PULL 35/37] docs/devel: add a codebase section, Alex Bennée, 2025/01/17
- [PULL 26/37] plugins: fix kdoc annotation, Alex Bennée, 2025/01/17
- [PULL 34/37] docs/devel: add information on how to setup build environments, Alex Bennée, 2025/01/17
- [PULL 19/37] contrib/plugins/hwprofile: fix 32-bit build, Alex Bennée, 2025/01/17
- [PULL 37/37] scripts/nsis.py: Run dependency check for each DLL file only once, Alex Bennée, 2025/01/17
- [PULL 20/37] contrib/plugins/hotpages: fix 32-bit build,
Alex Bennée <=
- [PULL 31/37] docs/sphinx: include kernel-doc script as a dependency, Alex Bennée, 2025/01/17
- [PULL 25/37] plugins: enable linking with clang/lld, Alex Bennée, 2025/01/17
- [PULL 32/37] docs/devel: add git-publish for patch submitting, Alex Bennée, 2025/01/17
- [PULL 24/37] docs/devel/style: add a section about bitfield, and disallow them for packed structures, Alex Bennée, 2025/01/17
- Re: [PULL 00/37] maintainer updates for gdb, plugins, documentation and windows builds, Stefan Hajnoczi, 2025/01/17