From patchwork Mon Oct 18 06:15: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: 68126 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 74BD9B70FB for ; Mon, 18 Oct 2010 17:22:47 +1100 (EST) Received: from localhost ([127.0.0.1]:50489 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7j7M-0006Aq-BK for incoming@patchwork.ozlabs.org; Mon, 18 Oct 2010 02:22:44 -0400 Received: from [140.186.70.92] (port=50137 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7j2E-00048n-E4 for qemu-devel@nongnu.org; Mon, 18 Oct 2010 02:17:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7j2D-0004oC-Fi for qemu-devel@nongnu.org; Mon, 18 Oct 2010 02:17:26 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:55656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7j2C-0004o3-Pu for qemu-devel@nongnu.org; Mon, 18 Oct 2010 02:17:25 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp07.in.ibm.com (8.14.4/8.13.1) with ESMTP id o9I6HKEs006449 for ; Mon, 18 Oct 2010 11:47:20 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9I6HKi43297370 for ; Mon, 18 Oct 2010 11:47:20 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9I6HJUX027031 for ; Mon, 18 Oct 2010 17:17:20 +1100 Received: from zephyr ([9.124.35.82]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9I6HJHw027028; Mon, 18 Oct 2010 17:17:19 +1100 Date: Mon, 18 Oct 2010 11:45:34 +0530 From: Prerna Saxena To: qemu-devel Message-ID: <20101018114534.22f3c025@zephyr> In-Reply-To: <20101018113655.09b6a48d@zephyr> References: <20101018113655.09b6a48d@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: Anthony Liguori , Hajnoczi , Mahesh , Stefan, Luiz Capitulino , Ananth Narayan Subject: [Qemu-devel] [Tracing][RFC v3 PATCH 2/2] Add documentation for QMP commands: query-trace & query-trace-events. 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 [PATCH 2/2] Add documentation for QMP commands: query-trace & query-trace-events. Signed-off-by: Prerna Saxena --- qmp-commands.hx | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 793cf1c..fefc93d 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1539,3 +1539,74 @@ 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) +- "timestamp": trace timestamp (json-int) +- "arg1 .. arg6": Arguments logged by the trace-event (json-int) + +Example: + +-> { "execute": "query-trace" } +<- { + "return":{ + "event": 22, + "timestamp": 129456235912365, + "arg1": 886 + "arg2": 80, + "arg3": 0, + "arg4": 0, + "arg5": 0, + "arg6": 0, + }, + { + "event": 22, + "timestamp": 129456235973407, + "arg1": 886, + "arg2": 80, + "arg3": 0, + "arg4": 0, + "arg5": 0, + "arg6": 0 + }, + ... + } + +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) +- "event-id": Event ID of Trace-event (json-int) +- "state": State of trace-event [ '0': inactive; '1':active ] (json-int) + +Example: + +-> { "execute": "query-trace-events" } +<- { + "return":{ + "name": "qemu_malloc", + "event-id": 0 + "state": 0, + }, + { + "name": "qemu_realloc", + "event-id": 1, + "state": 0 + }, + ... + } + +EQMP