From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51173 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8rYq-0000pk-2W for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:36:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8rYk-0004nv-QJ for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:35:44 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:39608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8rYk-0004nC-4w for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:35:42 -0400 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp08.in.ibm.com (8.14.4/8.13.1) with ESMTP id o9L9888Z016137 for ; Thu, 21 Oct 2010 14:38:08 +0530 Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9L9ZbIw4509820 for ; Thu, 21 Oct 2010 15:05:37 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9L9Zbw0014517 for ; Thu, 21 Oct 2010 20:35:37 +1100 Date: Thu, 21 Oct 2010 15:05:34 +0530 From: Prerna Saxena Message-ID: <20101021150534.2837ce02@zephyr> In-Reply-To: <20101021144929.7911128a@zephyr> References: <20101021144929.7911128a@zephyr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC][PATCH 1/5] query-trace command List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Mahesh , Ananth Narayan , Stefan Hajnoczi , Luiz Capitulino QMP interface "query-trace" to list current contents of trace-buffer. ( Analogous to hmp command : info trace ) Signed-off-by: Prerna Saxena --- 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