qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command trace


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command trace event
Date: Mon, 5 Jun 2017 07:28:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

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 <address@hidden>
> ---
>  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 <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]