On 10/12/2015 02:41 AM, Denis V. Lunev wrote: > From: Pavel Butsykin <pbutsy...@virtuozzo.com> > > This log would be very welcome for long-term diagnostics of the system > in the production. This log is at least necessary to understand what > has been happened on the system and to identify issues at higher-level > subsystems (libvirt, etc). > > Signed-off-by: Pavel Butsykin <pbutsy...@virtuozzo.com> > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Markus Armbruster <arm...@redhat.com> > CC: Luiz Capitulino <lcapitul...@redhat.com> > CC: Eric Blake <ebl...@redhat.com> > ---
> @@ -3822,6 +3824,8 @@ static void handle_qmp_command(JSONMessageParser > *parser, QList *tokens) > error_setg(&local_err, QERR_JSON_PARSING); > goto err_out; > } > + qemu_log_mask(LOG_CMD, "qmp \"%s\" requested\n", > + qobject_to_json(obj)->string); > In addition to the leak already pointed out, qobject_to_json() can be expensive, and it looks like we are doing that work unconditionally even if the logging is not turned on. Is there a way to optimize so that the conversion is only done when logging is enabled? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature