From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 2/3] trace: trace monitor qmp dispatch/completion
Date: Fri, 30 Sep 2011 17:51:02 +0100 [thread overview]
Message-ID: <1317401463-7800-3-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1317401463-7800-1-git-send-email-stefanha@linux.vnet.ibm.com>
Add trace events for handle_qmp_command(), which dispatches qmp
commands, and monitor_protocol_emitter(), which produces the reply to a
qmp command.
Also remove duplicate #include "trace/control.h".
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
monitor.c | 5 ++++-
trace-events | 4 ++++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index 8ec2c5e..0bb88e9 100644
--- a/monitor.c
+++ b/monitor.c
@@ -57,11 +57,11 @@
#include "json-parser.h"
#include "osdep.h"
#include "cpu.h"
+#include "trace.h"
#include "trace/control.h"
#ifdef CONFIG_TRACE_SIMPLE
#include "trace/simple.h"
#endif
-#include "trace/control.h"
#include "ui/qemu-spice.h"
//#define DEBUG
@@ -369,6 +369,8 @@ static void monitor_protocol_emitter(Monitor *mon, QObject *data)
{
QDict *qmp;
+ trace_monitor_protocol_emitter(mon);
+
qmp = qdict_new();
if (!monitor_has_error(mon)) {
@@ -5089,6 +5091,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
qobject_incref(mon->mc->id);
cmd_name = qdict_get_str(input, "execute");
+ trace_handle_qmp_command(mon, cmd_name);
if (invalid_qmp_mode(mon, cmd_name)) {
qerror_report(QERR_COMMAND_NOT_FOUND, cmd_name);
goto err_out;
diff --git a/trace-events b/trace-events
index 79ff5ea..b982727 100644
--- a/trace-events
+++ b/trace-events
@@ -503,3 +503,7 @@ escc_sunkbd_event_in(int ch) "Untranslated keycode %2.2x"
escc_sunkbd_event_out(int ch) "Translated keycode %2.2x"
escc_kbd_command(int val) "Command %d"
escc_sunmouse_event(int dx, int dy, int buttons_state) "dx=%d dy=%d buttons=%01x"
+
+# monitor.c
+handle_qmp_command(void *mon, const char *cmd_name) "mon %p cmd_name \"%s\""
+monitor_protocol_emitter(void *mon) "mon %p"
--
1.7.6.3
next prev parent reply other threads:[~2011-09-30 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 16:51 [Qemu-devel] [PATCH 0/3] trace: more trace events for block and qmp Stefan Hajnoczi
2011-09-30 16:51 ` [Qemu-devel] [PATCH 1/3] trace: trace bdrv_open_common() Stefan Hajnoczi
2011-09-30 16:51 ` Stefan Hajnoczi [this message]
2011-09-30 16:51 ` [Qemu-devel] [PATCH 3/3] trace: add arguments to bdrv_co_io_em() trace event 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=1317401463-7800-3-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--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).