From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P85hi-0006eu-V2 for qemu-devel@nongnu.org; Tue, 19 Oct 2010 02:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P85hd-0005n3-RK for qemu-devel@nongnu.org; Tue, 19 Oct 2010 02:29:46 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:33099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P85hd-0005mQ-AU for qemu-devel@nongnu.org; Tue, 19 Oct 2010 02:29:41 -0400 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id o9J6TYtb026797 for ; Tue, 19 Oct 2010 17:29:34 +1100 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9J6Tdt42351312 for ; Tue, 19 Oct 2010 17:29:39 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9J6Tdmk020566 for ; Tue, 19 Oct 2010 17:29:39 +1100 Date: Tue, 19 Oct 2010 11:57:50 +0530 From: Prerna Saxena Message-ID: <20101019115750.7ce4a0c7@zephyr> In-Reply-To: <20101019114922.66d7c31d@zephyr> References: <20101019114922.66d7c31d@zephyr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [Tracing][v4 PATCH 2/2] Add documentation for QMP interfaces 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 [PATCH 2/2] Add documentation for QMP commands: - query-trace - query-trace-events - query-trace-file. Signed-off-by: Prerna Saxena --- qmp-commands.hx | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index 793cf1c..bc79b55 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1539,3 +1539,97 @@ 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 + +SQMP +query-trace-file +---------------- + +Display currently set trace file name and its status. + +Returns a set of json-objects containing the following data: + +- "trace-file": Name of Trace-file (json-string) +- "status": State of trace-event [ '0': disabled; '1':enabled ] (json-int) + +Example: + +-> { "execute": "query-trace-file" } +<- { + "return":{ + "trace-file": "trace-26609", + "status": 1 + } + } + +EQMP -- 1.7.2.2 -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India