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 <pierrick.bouvier@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
ckf104 2024-12-17 22:24:15 +08:00 committed by Michael Tokarev
parent a8743193ff
commit 8ee904b3a4

View file

@ -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);