qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command trace event
Date: Mon, 5 Jun 2017 07:28:35 -0500	[thread overview]
Message-ID: <935cf4db-d918-04e5-fed7-bd0f4e17ffc1@redhat.com> (raw)
In-Reply-To: <20170605104216.22429-3-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

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 <stefanha@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 <eblake@redhat.com>

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-06-05 12:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 10:42 [Qemu-devel] [PATCH 0/2] monitor: add trace events for HMP and QMP commands Stefan Hajnoczi
2017-06-05 10:42 ` [Qemu-devel] [PATCH 1/2] monitor: add handle_hmp_command trace event Stefan Hajnoczi
2017-06-05 12:29   ` Eric Blake
2017-06-05 10:42 ` [Qemu-devel] [PATCH 2/2] monitor: resurrect handle_qmp_command " Stefan Hajnoczi
2017-06-05 12:28   ` Eric Blake [this message]
2017-06-12 13:48 ` [Qemu-devel] [PATCH 0/2] monitor: add trace events for HMP and QMP commands Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=935cf4db-d918-04e5-fed7-bd0f4e17ffc1@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).