[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 6/6] trace: Add QAPI/QMP interfaces to query
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH v2 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state |
Date: |
Fri, 10 Jun 2016 16:49:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake writes:
> On 06/09/2016 11:34 AM, Lluís Vilanova wrote:
>> Signed-off-by: Lluís Vilanova <address@hidden>
>> Reviewed-by: Stefan Hajnoczi <address@hidden>
>> ---
>> monitor.c | 4 +-
>> qapi/trace.json | 20 ++++++--
>> qmp-commands.hx | 18 ++++++-
>> trace/qmp.c | 143
>> ++++++++++++++++++++++++++++++++++++++++++++-----------
>> 4 files changed, 147 insertions(+), 38 deletions(-)
>>
>> +++ b/qapi/trace.json
>> @@ -1,6 +1,6 @@
>> # -*- mode: python -*-
>> #
>> -# Copyright (C) 2011-2014 Lluís Vilanova <address@hidden>
>> +# Copyright (C) 2011-2016 Lluís Vilanova <address@hidden>
>> #
>> # This work is licensed under the terms of the GNU GPL, version 2 or later.
>> # See the COPYING file in the top-level directory.
>> @@ -29,11 +29,12 @@
>> #
>> # @name: Event name.
>> # @state: Tracing state.
>> +# @vcpu: Whether this is a per-vCPU event (since 2.6).
> s/2.6/2.7/
>> #
>> # Since 2.2
>> ##
>> { 'struct': 'TraceEventInfo',
>> - 'data': {'name': 'str', 'state': 'TraceEventState'} }
>> + 'data': {'name': 'str', 'state': 'TraceEventState', 'vcpu': 'bool'} }
>>
>> ##
>> # @trace-event-get-state:
>> @@ -41,13 +42,18 @@
>> # Query the state of events.
>> #
>> # @name: Event name pattern (case-sensitive glob).
>> +# @vcpu: #optional The vCPU to check (any by default; since 2.6).
> and again
>> #
>> # Returns: a list of @TraceEventInfo for the matching events
>> #
>> +# For any event without the "vcpu" property:
>> +# - If @name is a pattern and @vcpu is set, events are ignored.
>> +# - If @name is not a pattern and @vcpu is set, an error is raised.
>> +#
>> # Since 2.2
>> ##
>> { 'command': 'trace-event-get-state',
>> - 'data': {'name': 'str'},
>> + 'data': {'name': 'str', '*vcpu': 'int'},
>> 'returns': ['TraceEventInfo'] }
>>
>> ##
>> @@ -58,8 +64,14 @@
>> # @name: Event name pattern (case-sensitive glob).
>> # @enable: Whether to enable tracing.
>> # @ignore-unavailable: #optional Do not match unavailable events with @name.
>> +# @vcpu: #optional The vCPU to act upon (all by default; since 2.6).
> and again
>> +#
>> +# For any event without the "vcpu" property:
>> +# - If @name is a pattern and @vcpu is set, events are ignored.
>> +# - If @name is not a pattern and @vcpu is set, an error is raised.
>> #
>> # Since 2.2
>> ##
>> { 'command': 'trace-event-set-state',
>> - 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool'} }
>> + 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool',
>> + '*vcpu': 'int'} }
>> diff --git a/qmp-commands.hx b/qmp-commands.hx
>> index 28801a2..ae1e533 100644
>> --- a/qmp-commands.hx
>> @@ -4773,7 +4786,6 @@ Move mouse pointer to absolute coordinates (20000,
>> 400).
>> { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
>> { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
>> <- { "return": {} }
>> -
>> EQMP
> Spurious hunk.
Doh, thanks. I always miss updating the version references, I'm really sorry
about that.
Cheers,
Lluis
- [Qemu-devel] [PATCHv20/6] trace: Per-vCPU tracing states, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 1/6] trace: Identify events with the 'vcpu' property, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 3/6] [trivial] trace: Cosmetic changes on fast-path tracing, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 5/6] trace: Conditionally trace events based on their per-vCPU state, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property, Lluís Vilanova, 2016/06/09
- [Qemu-devel] [PATCH v2 2/6] disas: Remove unused macro '_', Lluís Vilanova, 2016/06/09