Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-15 Thread Alex Bennée
Richard Henderson writes: > On 10/5/18 8:49 AM, Alex Bennée wrote: >> +char *plugin_status(void) >> +{ >> +GString *report = g_string_new("We have "); >> +char *r; >> +g_mutex_lock(&lock); >> +g_string_append_printf(report, "%ud entries in the hash table\n", >> +

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-15 Thread Richard Henderson
On 10/5/18 8:49 AM, Alex Bennée wrote: > +char *plugin_status(void) > +{ > +GString *report = g_string_new("We have "); > +char *r; > +g_mutex_lock(&lock); > +g_string_append_printf(report, "%ud entries in the hash table\n", > + g_hash_table_size(hotblocks)

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-08 Thread Alex Bennée
Pavel Dovgalyuk writes: > I guess this one is too tcg-dependent. > It count TB's, but breaking code into TBs may depend on many things, > like breakpoints, record/replay, ... > > I mean that this measuring approach may be used only in some specific > cases, and not ok as an example. You are ri

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-08 Thread Pavel Dovgalyuk
I guess this one is too tcg-dependent. It count TB's, but breaking code into TBs may depend on many things, like breakpoints, record/replay, ... I mean that this measuring approach may be used only in some specific cases, and not ok as an example. Pavel Dovgalyuk > -Original Message- > F

[Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-05 Thread Alex Bennée
This plugin attempts to track hotblocks by total execution count and average time to return to block. It is intended to be lower impact than saving a long log file and post-processing it. Signed-off-by: Alex Bennée --- trace/plugins/hotblocks/hotblocks.c | 69 + 1 fil