diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-06-05 11:42:16 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-06-13 14:35:11 +0100 |
commit | b097efc0027e36fd15a4fc2e415e780611024757 (patch) | |
tree | 8ecf3e2c06aea4ca2b3dbaf783d5c75b5fe66ce5 /monitor.c | |
parent | 79cad8b46ba79116ded5690ea2e265585bb9cb53 (diff) |
monitor: resurrect handle_qmp_command trace event
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>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170605104216.22429-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -3809,6 +3809,7 @@ static void handle_qmp_command(JSONMessageParser *parser, GQueue *tokens) QDict *qdict = NULL; Monitor *mon = cur_mon; Error *err = NULL; + QString *req_json; req = json_parser_parse_err(tokens, NULL, &err); if (!req && !err) { @@ -3826,6 +3827,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)); + rsp = qmp_dispatch(cur_mon->qmp.commands, req); if (mon->qmp.commands == &qmp_cap_negotiation_commands) { |