diff mbox

[Tracing,RFC,2/2] : Documentation for QMP interfaces

Message ID 20101014113120.386e8840@zephyr
State New
Headers show

Commit Message

Prerna Saxena Oct. 14, 2010, 6:01 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 |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

Comments

Stefan Hajnoczi Oct. 14, 2010, 10:10 a.m. UTC | #1
On Thu, Oct 14, 2010 at 11:31:20AM +0530, Prerna Saxena wrote:
> [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 |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 53 insertions(+), 0 deletions(-)
> 
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 793cf1c..9a48984 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -1539,3 +1539,56 @@ 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)

JSON names are lowercase like the C fields they represent, please use
"event".

> +- "arg1 .. arg6": Arguments logged by the trace-event (json-int)

What about the timestamp_ns field?

> +
> +Example:
> +
> +-> { "execute": "query-trace" }
> +<- {
> +      "return":{
> +         "Event": 22,
> +         "arg6": 0,
> +         "arg5": 0,
> +         "arg4": 0,
> +         "arg3": 0,
> +         "arg2": 80,
> +         "arg1": 886
> +       }
> +   }
> +
> +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)
> +- "state": State of trace-event [ '0': inactive; '1':active  ] (json-int)
> +- "eventID": Event ID of Trace-event (json-int)
> +
> +Example:
> +
> +-> { "execute": "query-trace-events" }
> +<- {
> +      "return":{
> +         "name": "qemu_malloc",
> +         "state": 0,
> +         "eventID": 0
> +      }
> +   }
> +
> +EQMP
> +
> -- 
> 1.7.2.2
> 
> 
> 
> -- 
> Prerna Saxena
> 
> Linux Technology Centre,
> IBM Systems and Technology Lab,
> Bangalore, India
>
diff mbox

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index 793cf1c..9a48984 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1539,3 +1539,56 @@  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)
+- "arg1 .. arg6": Arguments logged by the trace-event (json-int)
+
+Example:
+
+-> { "execute": "query-trace" }
+<- {
+      "return":{
+         "Event": 22,
+         "arg6": 0,
+         "arg5": 0,
+         "arg4": 0,
+         "arg3": 0,
+         "arg2": 80,
+         "arg1": 886
+       }
+   }
+
+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)
+- "state": State of trace-event [ '0': inactive; '1':active  ] (json-int)
+- "eventID": Event ID of Trace-event (json-int)
+
+Example:
+
+-> { "execute": "query-trace-events" }
+<- {
+      "return":{
+         "name": "qemu_malloc",
+         "state": 0,
+         "eventID": 0
+      }
+   }
+
+EQMP
+