Markus Armbruster writes: > Lluís Vilanova <vilan...@ac.upc.edu> writes: >> Markus Armbruster writes: >> >>> Lluís Vilanova <vilan...@ac.upc.edu> writes: [...] >>>> diff --git a/qapi/trace.json b/qapi/trace.json >>>> index 01b0a52..25d8095 100644 >>>> --- a/qapi/trace.json >>>> +++ b/qapi/trace.json >>>> @@ -1,6 +1,6 @@ >>>> # -*- mode: python -*- >>>> # >>>> -# Copyright (C) 2011-2014 Lluís Vilanova <vilan...@ac.upc.edu> >>>> +# Copyright (C) 2011-2016 Lluís Vilanova <vilan...@ac.upc.edu> >>>> # >>>> # 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.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.7). >>>> # >>>> # Returns: a list of @TraceEventInfo for the matching events >>>> # >>>> +# For any event without the "vcpu" property: >> >>> All events have the vcpu property, but for some of them the property's >>> value is false. >> >> Hmmm, do you mean in the generated event array? Here, I was referring to >> wether >> an event has the "vcpu" property in "trace-events". I can clarify that.
> What is "trace-events"? The file in the source tree? Exactly. Adding the "tcgv" property to an event on that file is what defines whether the event is per-vCPU. [...] >>>> +# - If @name is not a pattern and @vcpu is set, an error is raised. >> >>> Perhaps we could clarify as follows: >> >>> # Returns: a list of @TraceEventInfo for the matching events >>> # >>> # An event matches if >>> # - its name matches the @name pattern, and >>> # - if @vcpu is given, its vCPU equals @vcpu. >>> # It follows that with @vcpu given, the query can match only per-vCPU >>> # events. Special case: if the name is an exact match, you get an error >>> # instead of an empty list. >> >> Doesn't sound entirely right to me: >> >> # Returns: a list of @TraceEventInfo for the matching events >> # >> # An event matches if >> # - its name matches the @name pattern, and >> # - if @vcpu is given, the event is a per-vCPU one (has the "vcpu" property >> in >> # "trace-events"). > Fails to mention that @vcpu selects the TraceEventInfo for that > particular VCPU. That's what I tried to express by "its vCPU equals > @vcpu". [...] Right. Thanks, Lluis