@@ -474,7 +474,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
uint64_t effective_addr;
if (sys) {
- effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn);
+ effective_addr = (uint64_t)(uintptr_t) qemu_plugin_insn_haddr(insn);
} else {
effective_addr = (uint64_t) qemu_plugin_insn_vaddr(insn);
}
@@ -215,10 +215,10 @@ static NodeData *fetch_node(uint64_t addr, bool create_if_not_found)
NodeData *node = NULL;
g_mutex_lock(&node_lock);
- node = (NodeData *) g_hash_table_lookup(nodes, (gconstpointer) addr);
+ node = (NodeData *) g_hash_table_lookup(nodes, (gconstpointer)(uintptr_t) addr);
if (!node && create_if_not_found) {
node = create_node(addr);
- g_hash_table_insert(nodes, (gpointer) addr, (gpointer) node);
+ g_hash_table_insert(nodes, (gpointer)(uintptr_t) addr, (gpointer) node);
}
g_mutex_unlock(&node_lock);
return node;
@@ -111,7 +111,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)
ExecCount *cnt;
uint64_t pc = qemu_plugin_tb_vaddr(tb);
size_t insns = qemu_plugin_tb_n_insns(tb);
- uint64_t hash = pc ^ insns;
+ uintptr_t hash = pc ^ insns;
g_mutex_lock(&lock);
cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash);
@@ -169,7 +169,7 @@ static IOLocationCounts *new_location(GHashTable *table, uint64_t
off_or_pc)
{
IOLocationCounts *loc = g_new0(IOLocationCounts, 1);
loc->off_or_pc = off_or_pc;
- g_hash_table_insert(table, (gpointer) off_or_pc, loc);
+ g_hash_table_insert(table, (gpointer)(uintptr_t) off_or_pc, loc);
return loc;
}