From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40889 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8p35-0005I9-Bh for qemu-devel@nongnu.org; Thu, 21 Oct 2010 02:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8p33-0004dv-QA for qemu-devel@nongnu.org; Thu, 21 Oct 2010 02:54:51 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:38854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8p33-0004dI-1d for qemu-devel@nongnu.org; Thu, 21 Oct 2010 02:54:49 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp06.in.ibm.com (8.14.4/8.13.1) with ESMTP id o9L6sjXs010394 for ; Thu, 21 Oct 2010 12:24:45 +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 o9L6sjLi3309650 for ; Thu, 21 Oct 2010 12:24:45 +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 o9L6sjs2005070 for ; Thu, 21 Oct 2010 17:54:45 +1100 Message-ID: <4CBFE3B4.7040402@linux.vnet.ibm.com> Date: Thu, 21 Oct 2010 12:24:44 +0530 From: Prerna Saxena MIME-Version: 1.0 References: <20101020152849.6e714234@zephyr> <20101020172347.70310231@doriath> In-Reply-To: <20101020172347.70310231@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [Tracing][RFC] QMP interface to toggle state of a trace-event List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Mahesh , Ananth Narayan , qemu-devel , Stefan Hajnoczi Thanks for the review! On 10/21/2010 12:53 AM, Luiz Capitulino wrote: > On Wed, 20 Oct 2010 15:28:49 +0530 > Prerna Saxena wrote: > >> QMP command trace-event to toggle state of a trace-event. >> Illustration : >> -> { "execute": "trace-event", "arguments": { "name": "qemu_malloc", "option": true} } >> <- { "return": {} } >> >> Posting this as an RFC for now. I'll post the final version as a part of >> the cumulative QMP patchset for tracing ( including patches for query-* >> commands posted earlier : >> http://lists.gnu.org/archive/html/qemu-devel/2010-10/msg01232.html ) >> >> Signed-off-by: Prerna Saxena >> --- >> hmp-commands.hx | 2 +- >> monitor.c | 43 +++++++++++++++++++++++++++++++++++++------ >> qmp-commands.hx | 32 ++++++++++++++++++++++++++++++++ >> 3 files changed, 70 insertions(+), 7 deletions(-) >> diff --git a/qmp-commands.hx b/qmp-commands.hx >> index bc79b55..7613d73 100644 >> --- a/qmp-commands.hx >> +++ b/qmp-commands.hx >> @@ -761,6 +761,38 @@ Example: >> >> Note: This command must be issued before issuing any other command. >> >> +EQMP >> + >> + { >> + .name = "trace-event", >> + .args_type = "name:s,option:b", >> + .params = "name on|off", >> + .help = "changes state of a specific trace event", >> + .user_print = monitor_user_noop, >> + .mhandler.cmd_new = do_change_trace_event_state_qmp, >> + }, >> + >> +SQMP >> +trace-event >> +----------- >> + >> +Change state of a trace-event. >> + >> +Arguments: >> + >> +- "name": name of trace-event (json-string) >> +- "option": new state for the trace-event (json-bool) > > This should be called 'enabled'. > I agree, 'enabled' is less ambiguous. Will change in the next patchset. > I think you should submit a new series containing only the proposed > interfaces documentation (one patch per interface) and the intro email > should describe the use cases the proposed interfaces are supposed to > address. I'll send out the new documentation patchset series shortly. >> + >> +Example: >> + >> +-> { "execute": "trace-event", "arguments": { "name": "ABC", "option":false } } >> +<- { "return": {} } >> + >> +Notes: >> + >> +(1) The 'query-trace-events' command should be used to check the new state >> + of the trace-event. >> + >> 3. Query Commands >> ================= >> > -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India