From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 1/2] monitor: add handle_hmp_command trace event
Date: Tue, 13 Jun 2017 14:35:30 +0100 [thread overview]
Message-ID: <20170613133531.24671-2-stefanha@redhat.com> (raw)
In-Reply-To: <20170613133531.24671-1-stefanha@redhat.com>
It is often useful to correlate QEMU-internal events with monitor
commands that caused them. Trace the full HMP command being executed.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170605104216.22429-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
monitor.c | 2 ++
trace-events | 1 +
2 files changed, 3 insertions(+)
diff --git a/monitor.c b/monitor.c
index 1e63ace..11de403 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3088,6 +3088,8 @@ static void handle_hmp_command(Monitor *mon, const char *cmdline)
QDict *qdict;
const mon_cmd_t *cmd;
+ trace_handle_hmp_command(mon, cmdline);
+
cmd = monitor_parse_command(mon, &cmdline, mon->cmd_table);
if (!cmd) {
return;
diff --git a/trace-events b/trace-events
index b496be9..6fe7818 100644
--- a/trace-events
+++ b/trace-events
@@ -45,6 +45,7 @@ qemu_system_powerdown_request(void) ""
monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p"
monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"
monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "event=%d data=%p rate=%" PRId64
+handle_hmp_command(void *mon, const char *cmdline) "mon %p cmdline: %s"
# dma-helpers.c
dma_blk_io(void *dbs, void *bs, int64_t offset, bool to_dev) "dbs=%p bs=%p offset=%" PRId64 " to_dev=%d"
--
2.9.4
next prev parent reply other threads:[~2017-06-13 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 13:35 [Qemu-devel] [PULL 0/2] Tracing patches Stefan Hajnoczi
2017-06-13 13:35 ` Stefan Hajnoczi [this message]
2017-06-13 13:35 ` [Qemu-devel] [PULL 2/2] monitor: resurrect handle_qmp_command trace event Stefan Hajnoczi
2017-06-13 14:17 ` [Qemu-devel] [PULL 0/2] Tracing patches no-reply
2017-06-13 14:48 ` Peter Maydell
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=20170613133531.24671-2-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).