diff mbox

[Tracing,RFC,v3,2/2] Add documentation for QMP commands: query-trace & query-trace-events.

Message ID 20101018114534.22f3c025@zephyr
State New
Headers show

Commit Message

Prerna Saxena Oct. 18, 2010, 6:15 a.m. UTC
[PATCH 2/2] Add documentation for QMP commands: query-trace & query-trace-events.

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

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index 793cf1c..fefc93d 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1539,3 +1539,74 @@  Example:
 
 EQMP
 
+SQMP
+query-trace
+-------------
+
+Show contents of trace buffer.
+
+Returns a set of json-objects containing the following data:
+
+- "event": Event ID for the trace-event(json-int)
+- "timestamp": trace timestamp (json-int)
+- "arg1 .. arg6": Arguments logged by the trace-event (json-int)
+
+Example:
+
+-> { "execute": "query-trace" }
+<- {
+      "return":{
+         "event": 22,
+         "timestamp": 129456235912365,
+         "arg1": 886
+         "arg2": 80,
+         "arg3": 0,
+         "arg4": 0,
+         "arg5": 0,
+         "arg6": 0,
+       },
+       {
+         "event": 22,
+         "timestamp": 129456235973407,
+         "arg1": 886,
+         "arg2": 80,
+         "arg3": 0,
+         "arg4": 0,
+         "arg5": 0,
+         "arg6": 0
+       },
+       ...
+   }
+
+EQMP
+
+SQMP
+query-trace-events
+------------------
+
+Show all available trace-events & their state.
+
+Returns a set 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 [ '0': inactive; '1':active  ] (json-int)
+
+Example:
+
+-> { "execute": "query-trace-events" }
+<- {
+      "return":{
+         "name": "qemu_malloc",
+         "event-id": 0
+         "state": 0,
+      },
+      {
+         "name": "qemu_realloc",
+         "event-id": 1,
+         "state": 0
+      },
+      ...
+   }
+
+EQMP