On 06/05/2017 05:42 AM, Stefan Hajnoczi wrote: > Commit 104fc3027960dd2aa9d310936a6cb201c60e1088 ("qmp: Drop duplicated > QMP command object checks") removed the call to > trace_handle_qmp_command() while eliminating code duplication. > > This patch brings the trace event back so QEMU-internal trace events can > be correlated with the QMP commands that caused them. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > monitor.c | 5 +++++ > trace-events | 1 + > 2 files changed, 6 insertions(+) >
> @@ -3823,6 +3824,10 @@ static void handle_qmp_command(JSONMessageParser > *parser, GQueue *tokens) > qdict_del(qdict, "id"); > } /* else will fail qmp_dispatch() */ > > + req_json = qobject_to_json(req); > + trace_handle_qmp_command(mon, qstring_get_str(req_json)); > + qobject_decref(QOBJECT(req_json)); I should really revive my patches that create a JSON output visitor, as it would use less memory allocation in use cases like this. But that's not your problem. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature