Patchwork [RFC,2/5] query-trace-events

login
register
mail settings
Submitter Prerna Saxena
Date Oct. 21, 2010, 9:37 a.m.
Message ID <20101021150728.2b11f5fc@zephyr>
Download mbox | patch
Permalink /patch/68559/
State New
Headers show

Comments

Prerna Saxena - Oct. 21, 2010, 9:37 a.m.
'query-trace-events' : QMP interface to display currently available 
trace-events with their state.
( Analogous to hmp command : info trace-events )

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qmp-commands.hx |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index f289064..e079eef 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1590,3 +1590,35 @@  Example:
    }
 
 EQMP
+
+SQMP
+query-trace-events
+------------------
+
+Show all available trace-events & their state.
+
+Returns a json-array of json-objects containing the following data:
+
+- "name": Name of Trace-event (json-string)
+- "event_id": Event ID of Trace-event (json-int)
+- "state": State of trace-event (json-bool)
+
+Example:
+
+-> { "execute": "query-trace-events" }
+<- {
+      "return":[
+         {
+            "name": "qemu_malloc",
+            "event_id": 0,
+            "state": false
+         },
+         {
+            "name": "qemu_realloc",
+            "event_id": 1,
+            "state": false
+         },
+      ]
+   }
+
+EQMP