qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] contrib/plugins/bbv.c: Start bb index from 1
@ 2024-12-17 14:24 ckf104
  2024-12-17 21:11 ` Pierrick Bouvier
  2024-12-22  9:11 ` Michael Tokarev
  0 siblings, 2 replies; 6+ messages in thread
From: ckf104 @ 2024-12-17 14:24 UTC (permalink / raw)
  To: qemu-trivial
  Cc: ckf104, Alex Bennée, Alexandre Iooss, Mahmoud Mandour,
	Pierrick Bouvier, open list:All patches CC here

Standard simpoint tool reqeusts that index of basic block index starts from 1.

Signed-off-by: ckf104 <1900011634@pku.edu.cn>
---
 contrib/plugins/bbv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-09 20:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-17 14:24 [PATCH] contrib/plugins/bbv.c: Start bb index from 1 ckf104
2024-12-17 21:11 ` Pierrick Bouvier
2024-12-22  9:11 ` Michael Tokarev
2024-12-22 22:51   ` Pierrick Bouvier
2024-12-27 23:50   ` Alex Bennée
2025-01-09 20:50     ` Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).