mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
contrib/plugins/hotpages: fix 32-bit build
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>
This commit is contained in:
parent
cab85a63e0
commit
645bf06012
1 changed files with 3 additions and 3 deletions
|
@ -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++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue