From patchwork Thu Oct 21 09:35:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prerna Saxena X-Patchwork-Id: 68560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E2E29B70EB for ; Thu, 21 Oct 2010 20:48:54 +1100 (EST) Received: from localhost ([127.0.0.1]:34659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8rdX-0002kV-LJ for incoming@patchwork.ozlabs.org; Thu, 21 Oct 2010 05:40:39 -0400 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 Received: from zephyr ([9.124.35.82]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9L9Zbbo014498; Thu, 21 Oct 2010 20:35:37 +1100 Date: Thu, 21 Oct 2010 15:05:34 +0530 From: Prerna Saxena To: qemu-devel Message-ID: <20101021150534.2837ce02@zephyr> In-Reply-To: <20101021144929.7911128a@zephyr> References: <20101021144929.7911128a@zephyr> Organization: IBM X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-redhat-linux-gnu) Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Mahesh , Ananth Narayan , Stefan Hajnoczi , Luiz Capitulino Subject: [Qemu-devel] [RFC][PATCH 1/5] query-trace command X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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