qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC][PATCH 1/5] query-trace command


From: Prerna Saxena
Subject: [Qemu-devel] [RFC][PATCH 1/5] query-trace command
Date: Thu, 21 Oct 2010 15:05:34 +0530

QMP interface "query-trace" to list current contents of trace-buffer.
( Analogous to hmp command : info trace )


Signed-off-by: Prerna Saxena <address@hidden>
---
 qmp-commands.hx |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/qmp-commands.hx b/qmp-commands.hx
index 793cf1c..f289064 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -1539,3 +1539,54 @@ Example:
 
 EQMP
 
+SQMP
+query-trace
+-------------
+
+Show current contents of trace buffer.
+
+Returns a json-array of json-objects containing the following data:
+
+- "event_id": Event ID for the trace-event(json-int)
+- "timestamp": trace timestamp in ns (json-int)
+- "trace-arg": A json-object containing args logged by the trace-event:
+    - "arg1": First trace argument (json-int)
+    - "arg2": Second trace argument (json-int)
+    - "arg3": Third trace argument (json-int)
+    - "arg4": Fourth trace argument (json-int)
+    - "arg5": Fifth trace argument (json-int)
+    - "arg6": Sixth trace argument (json-int)
+
+Example:
+
+-> { "execute": "query-trace" }
+<- {
+      "return":[
+         {
+            "event": 22,
+            "timestamp": 129456235912365,
+            "trace-arg":{
+               "arg1": 886,
+               "arg2": 80,
+               "arg3": 0,
+               "arg4": 0,
+               "arg5": 0,
+               "arg6": 0,
+            }
+         },
+         {
+            "event": 22,
+            "timestamp": 129456235973407,
+            "trace-arg":{
+               "arg1": 886,
+               "arg2": 80,
+               "arg3": 0,
+               "arg4": 0,
+               "arg5": 0,
+               "arg6": 0
+            },
+         }
+      ]
+   }
+
+EQMP
-- 
1.7.2.3



-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India




reply via email to

[Prev in Thread] Current Thread [Next in Thread]