From: ckf104 <1900011634@pku.edu.cn> Date: Tue, 17 Dec 2024 14:24:15 +0000 (+0800) Subject: contrib/plugins/bbv.c: Start bb index from 1 X-Git-Tag: pull-vmclock-20250108~7^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8ee904b3a4b5638a0046ee3e1948d89ecb2e2668;p=users%2Fdwmw2%2Fqemu.git contrib/plugins/bbv.c: Start bb index from 1 Standard simpoint tool reqeusts that index of basic block index starts from 1. Signed-off-by: ckf104 <1900011634@pku.edu.cn> Reviewed-by: Pierrick Bouvier Reviewed-by: Michael Tokarev Signed-off-by: Michael Tokarev --- diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index a5256517dd..b9da6f815e 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -109,7 +109,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) bb = g_new(Bb, 1); bb->vaddr = vaddr; bb->count = qemu_plugin_scoreboard_new(sizeof(uint64_t)); - bb->index = g_hash_table_size(bbs); + bb->index = g_hash_table_size(bbs) + 1; g_hash_table_replace(bbs, &bb->vaddr, bb); } g_rw_lock_writer_unlock(&bbs_lock);