diff mbox

[RFC,4/5] trace-event

Message ID 20101021151018.3d12b5f1@zephyr
State New
Headers show

Commit Message

Prerna Saxena Oct. 21, 2010, 9:40 a.m. UTC
trace-event : QMP interface to change state of a trace-event.
(Analogous to hmp command : trace-event )

Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
 qmp-commands.hx |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

Comments

Stefan Hajnoczi Oct. 22, 2010, 3:27 p.m. UTC | #1
On Thu, Oct 21, 2010 at 03:10:18PM +0530, Prerna Saxena wrote:
> trace-event : QMP interface to change state of a trace-event.
> (Analogous to hmp command : trace-event )
> 
> Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
> ---
>  qmp-commands.hx |   32 ++++++++++++++++++++++++++++++++
>  1 files changed, 32 insertions(+), 0 deletions(-)
> 
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 7e95f4e..f2008e8 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.

The name is a little odd because it has no verb.  How about
set-trace-event or enable-trace-event?

Stefan
Prerna Saxena Oct. 25, 2010, 4:55 a.m. UTC | #2
On 10/22/2010 08:57 PM, Stefan Hajnoczi wrote:
> On Thu, Oct 21, 2010 at 03:10:18PM +0530, Prerna Saxena wrote:
>> trace-event : QMP interface to change state of a trace-event.
>> (Analogous to hmp command : trace-event )
>>
>> Signed-off-by: Prerna Saxena<prerna@linux.vnet.ibm.com>
>> ---
>>   qmp-commands.hx |   32 ++++++++++++++++++++++++++++++++
>>   1 files changed, 32 insertions(+), 0 deletions(-)
>>
>> diff --git a/qmp-commands.hx b/qmp-commands.hx
>> index 7e95f4e..f2008e8 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.
>
> The name is a little odd because it has no verb.  How about
> set-trace-event or enable-trace-event?
>

Sure, makes sense.
I'll incorporate this when I send out the next set of patches.

Thanks,
diff mbox

Patch

diff --git a/qmp-commands.hx b/qmp-commands.hx
index 7e95f4e..f2008e8 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)
+- "enable": New state to be set for the trace-event (json-bool)
+
+Example:
+
+-> { "execute": "trace-event", "arguments": { "name": "ABC", "enable":false } }
+<- { "return": {} }
+
+Notes:
+
+(1) The 'query-trace-events' command should be used to check the new state
+    of the trace-event.
+
 3. Query Commands
 =================