[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plu
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin |
Date: |
Mon, 15 Oct 2018 19:15:13 +0100 |
User-agent: |
mu4e 1.1.0; emacs 26.1.50 |
Richard Henderson <address@hidden> 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",
>> + g_hash_table_size(hotblocks));
>> + g_mutex_unlock(&lock);
>> + r = report->str;
>> + g_string_free(report, FALSE);
>> + return r;
>> +}
>
> You're not reporting the entries themselves?
> Also, are you sure you don't want to just return the GString?
I considered it. I wondered if exposing a glib dependency to the plugins
was fair game? It would make things simpler and QEMU could even allocate
it for the plugin.
>
>
> r~
--
Alex Bennée
- [Qemu-devel] [RFC PATCH 06/21] trace: show trace point counts in the monitor, (continued)
- [Qemu-devel] [RFC PATCH 06/21] trace: show trace point counts in the monitor, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 15/21] trace: add linux-user plugin support, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 21/21] plugin: add tlbflush stats plugin, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 20/21] plugins: add hotness summary to hotblocks, Alex Bennée, 2018/10/05
- [Qemu-devel] [RFC PATCH 17/21] hmp: expose status of plugins to the monitor, Alex Bennée, 2018/10/05
- Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC, Emilio G. Cota, 2018/10/06