aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-09-23 08:23:06 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-10-03 10:56:25 +0100
commit89bd820acb477b2c41f13977a3ceb4538fadcd02 (patch)
tree5195ec3a3a311c10e0c9b3edd1b6aa6cc016e7e4 /monitor.c
parent28dcee10c54984449259a13c6f27bf98c4770f3c (diff)
downloadqemu-89bd820acb477b2c41f13977a3ceb4538fadcd02.zip
qemu-89bd820acb477b2c41f13977a3ceb4538fadcd02.tar.gz
qemu-89bd820acb477b2c41f13977a3ceb4538fadcd02.tar.bz2
trace: trace monitor qmp dispatch/completion
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>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 08f6197..cf59442 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"
#include "memory.h"
@@ -370,6 +370,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)) {
@@ -5102,6 +5104,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;