From patchwork Thu Oct 21 09:37:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prerna Saxena X-Patchwork-Id: 68559 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 6E233B70EB for ; Thu, 21 Oct 2010 20:48:35 +1100 (EST) Received: from localhost ([127.0.0.1]:34708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8reX-0002wq-WB for incoming@patchwork.ozlabs.org; Thu, 21 Oct 2010 05:41:42 -0400 Received: from [140.186.70.92] (port=54485 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8rae-0001ar-RV for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:37:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8rab-00056s-4O for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:37:38 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:32858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8raa-00056d-Ah for qemu-devel@nongnu.org; Thu, 21 Oct 2010 05:37:37 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp03.in.ibm.com (8.14.4/8.13.1) with ESMTP id o9L9bWVA025296 for ; Thu, 21 Oct 2010 15:07:32 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9L9bVSJ3395638 for ; Thu, 21 Oct 2010 15:07:31 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9L9bVfn006476 for ; Thu, 21 Oct 2010 15:07:31 +0530 Received: from zephyr ([9.124.35.82]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9L9bVeo006462; Thu, 21 Oct 2010 15:07:31 +0530 Date: Thu, 21 Oct 2010 15:07:28 +0530 From: Prerna Saxena To: qemu-devel Message-ID: <20101021150728.2b11f5fc@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 2/5] 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 'query-trace-events' : QMP interface to display currently available trace-events with their state. ( Analogous to hmp command : info trace-events ) Signed-off-by: Prerna Saxena --- qmp-commands.hx | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index f289064..e079eef 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1590,3 +1590,35 @@ Example: } EQMP + +SQMP +query-trace-events +------------------ + +Show all available trace-events & their state. + +Returns a json-array 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 (json-bool) + +Example: + +-> { "execute": "query-trace-events" } +<- { + "return":[ + { + "name": "qemu_malloc", + "event_id": 0, + "state": false + }, + { + "name": "qemu_realloc", + "event_id": 1, + "state": false + }, + ] + } + +EQMP