Richard Henderson <[email protected]> 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