Message ID | 20241217142413.148978-1-1900011634@pku.edu.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | contrib/plugins/bbv.c: Start bb index from 1 | expand |
Hi, On 12/17/24 06:24, ckf104 wrote: > 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); thanks for this fix. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
17.12.2024 17:24, ckf104 wrote: > Standard simpoint tool reqeusts that index of basic block index starts from 1. While this patch is a trivial one-liner, but the underlying issue requires at least a minimal understanding of what it is all about, what *is* bbv to begin with, what `simpoint' is. I'm not sure it really is a trivial material? > Signed-off-by: ckf104 <1900011634@pku.edu.cn> Do we accept such SoBs these days? Thanks, /mjt
On 12/22/24 01:11, Michael Tokarev wrote: > 17.12.2024 17:24, ckf104 wrote: >> Standard simpoint tool reqeusts that index of basic block index starts from 1. > > While this patch is a trivial one-liner, but the underlying issue requires at least > a minimal understanding of what it is all about, what *is* bbv to begin with, what > `simpoint' is. I'm not sure it really is a trivial material? > This fix is alright. This plugin generated data for a binary analysis tool (named Simpoint) that needs specific data named basic block vectors (bbv). I didn't use it myself, I trust this change. >> Signed-off-by: ckf104 <1900011634@pku.edu.cn> > > Do we accept such SoBs these days? > > Thanks, > > /mjt
Michael Tokarev <mjt@tls.msk.ru> writes: > 17.12.2024 17:24, ckf104 wrote: >> Standard simpoint tool reqeusts that index of basic block index starts from 1. > > While this patch is a trivial one-liner, but the underlying issue requires at least > a minimal understanding of what it is all about, what *is* bbv to begin with, what > `simpoint' is. I'm not sure it really is a trivial material? > >> Signed-off-by: ckf104 <1900011634@pku.edu.cn> > > Do we accept such SoBs these days? The guidance is covered here: https://qemu.readthedocs.io/en/master/devel/submitting-a-patch.html#patch-emails-must-include-a-signed-off-by-line The wording: "It is the identity you choose to be known by in the community, but should not be anonymous, nor misrepresent whom you are" implies you should be identifiable to assert you can submit code and currently this email only shows up for this patch so is functionally anonymous I think? > > Thanks, > > /mjt
On 12/27/24 15:50, Alex Bennée wrote: > Michael Tokarev <mjt@tls.msk.ru> writes: > >> 17.12.2024 17:24, ckf104 wrote: >>> Standard simpoint tool reqeusts that index of basic block index starts from 1. >> >> While this patch is a trivial one-liner, but the underlying issue requires at least >> a minimal understanding of what it is all about, what *is* bbv to begin with, what >> `simpoint' is. I'm not sure it really is a trivial material? >> >>> Signed-off-by: ckf104 <1900011634@pku.edu.cn> >> >> Do we accept such SoBs these days? > > The guidance is covered here: https://qemu.readthedocs.io/en/master/devel/submitting-a-patch.html#patch-emails-must-include-a-signed-off-by-line > > The wording: "It is the identity you choose to be known by in the > community, but should not be anonymous, nor misrepresent whom you are" > implies you should be identifiable to assert you can submit code and > currently this email only shows up for this patch so is functionally > anonymous I think? > It this is an issue, it's probably faster to respin the patch under your name. Given the trivial content, I don't think it would be a problem for the original author. > >> >> Thanks, >> >> /mjt >
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);
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(-)