qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Prerna Saxena <prerna@linux.vnet.ibm.com>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: Mahesh <mahesh@linux.vnet.ibm.com>,
	Ananth Narayan <ananth@linux.vnet.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [RFC][PATCH 1/5] query-trace command
Date: Thu, 21 Oct 2010 15:05:34 +0530	[thread overview]
Message-ID: <20101021150534.2837ce02@zephyr> (raw)
In-Reply-To: <20101021144929.7911128a@zephyr>

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


Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 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	other threads:[~2010-10-21  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-21  9:19 [Qemu-devel] [RFC 0/5] QMP interfaces for tracing Prerna Saxena
2010-10-21  9:35 ` Prerna Saxena [this message]
2010-10-21  9:37 ` [Qemu-devel] [RFC][PATCH 2/5] query-trace-events Prerna Saxena
2010-10-21  9:39 ` [Qemu-devel] [RFC] [PATCH 3/5] query-trace-file Prerna Saxena
2010-10-21  9:40 ` [Qemu-devel] [RFC][PATCH 4/5] trace-event Prerna Saxena
2010-10-22 15:27   ` [Qemu-devel] " Stefan Hajnoczi
2010-10-25  4:55     ` Prerna Saxena
2010-10-21  9:42 ` [Qemu-devel] [RFC][PATCH 5/5] set-trace-file Prerna Saxena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101021150534.2837ce02@zephyr \
    --to=prerna@linux.vnet.ibm.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).