json = qobject_to_json_pretty(data, mon->pretty);
assert(json != NULL);
+ trace_monitor_qmp_respond(mon, json->str);
g_string_append_c(json, '\n');
monitor_puts(&mon->common, json->str);
}
}
+ trace_monitor_qmp_in_band_dequeue(req_obj,
+ req_obj->mon->qmp_requests->length);
+
if (qatomic_xchg(&qmp_dispatcher_co_busy, true) == true) {
/*
* Someone rescheduled us (probably because a new requests
monitor_qmp_dispatch(mon, req_obj->req);
} else {
assert(req_obj->err);
+ trace_monitor_qmp_err_in_band(error_get_pretty(req_obj->err));
rsp = qmp_error_response(req_obj->err);
req_obj->err = NULL;
monitor_qmp_respond(mon, rsp);
* handled in time order. Ownership for req_obj, req,
* etc. will be delivered to the handler side.
*/
+ trace_monitor_qmp_in_band_enqueue(req_obj, mon,
+ mon->qmp_requests->length);
assert(mon->qmp_requests->length < QMP_REQ_QUEUE_LEN_MAX);
g_queue_push_tail(mon->qmp_requests, req_obj);
qemu_mutex_unlock(&mon->qmp_queue_lock);
monitor_suspend(void *ptr, int cnt) "mon %p: %d"
# qmp.c
+monitor_qmp_in_band_enqueue(void *req, void *mon, unsigned len) "%p mon %p len %u"
+monitor_qmp_in_band_dequeue(void *req, unsigned len) "%p len %u"
monitor_qmp_cmd_in_band(const char *id) "%s"
+monitor_qmp_err_in_band(const char *desc) "%s"
monitor_qmp_cmd_out_of_band(const char *id) "%s"
+monitor_qmp_respond(void *mon, const char *json) "mon %p resp: %s"
handle_qmp_command(void *mon, const char *req) "mon %p req: %s"