]> xenbits.xensource.com Git - people/pauldu/qemu.git/commitdiff
monitor: add handle_hmp_command trace event
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 5 Jun 2017 10:42:15 +0000 (11:42 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 13 Jun 2017 13:35:10 +0000 (14:35 +0100)
It is often useful to correlate QEMU-internal events with monitor
commands that caused them.  Trace the full HMP command being executed.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20170605104216.22429-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
monitor.c
trace-events

index 1e63ace2d4f6de1d70a2f4f087d743eba97fb781..11de403edfd01b747155763c367fb7621b7c0b94 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -3088,6 +3088,8 @@ static void handle_hmp_command(Monitor *mon, const char *cmdline)
     QDict *qdict;
     const mon_cmd_t *cmd;
 
+    trace_handle_hmp_command(mon, cmdline);
+
     cmd = monitor_parse_command(mon, &cmdline, mon->cmd_table);
     if (!cmd) {
         return;
index b496be94d4dbc01e48e3246c880be0dc5c121ffb..6fe78180f0e3a728c187fde7f7b0f9bc1b6bc63f 100644 (file)
@@ -45,6 +45,7 @@ qemu_system_powerdown_request(void) ""
 monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p"
 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"
 
 # 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"