From e3e977d45b0750d7e4b8f9cac4b89e8082235188 Mon Sep 17 00:00:00 2001 From: Peter Xu Date: Fri, 9 Mar 2018 16:59:56 +0800 Subject: monitor: let suspend/resume work even with QMPs This patches allows QMP monitors to be suspended/resumed. One thing to mention is that for QMPs that are using IOThreads, we need an explicit kick for the IOThread in case it is sleeping. Meanwhile, we need to take special care on non-interactive HMPs. Currently only gdbserver is using that. For these monitors, we still don't allow suspend/resume operations. Since at it, add traces for the operations. Signed-off-by: Peter Xu Message-Id: <20180309090006.10018-14-peterx@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- trace-events | 1 + 1 file changed, 1 insertion(+) (limited to 'trace-events') diff --git a/trace-events b/trace-events index 855b0ab240..56670fecc8 100644 --- a/trace-events +++ b/trace-events @@ -47,6 +47,7 @@ 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" handle_qmp_command(void *mon, const char *req) "mon %p req: %s" +monitor_suspend(void *ptr, int cnt) "mon %p: %d" # 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" -- cgit v1.2.1