I missed this, because I wasn't cc'ed.

Stefan Hajnoczi <[email protected]> writes:

> From: Daniel P. Berrangé <[email protected]>
>
> The TraceEvent struct contains a "bool sstate" field which track whether
> a trace event was disabled statically. i.e. at build time via the
> "disable" property annotation in trace-events.
>
> The only runtime use of this field is to let "trace-event-get-state"
> report that an event is "unavailable" instead of reporting an error for
> an unknown trace event.
>
> Trace events are not ABI so their names can change and the event can
> come and go at any time. Thus there is little utility in reporting the
> existence of a disabled event that cannot ever be used at runtime.
>
> Removing the "bool sstate" field from TraceEvent saves 8 bytes of
> space in the struct, adding up to approx 64 KB across all current
> events.
>
> Reviewed-by: Marc-André Lureau <[email protected]>
> Signed-off-by: Daniel P. Berrangé <[email protected]>
> Message-id: [email protected]
> Signed-off-by: Stefan Hajnoczi <[email protected]>

[...]

> diff --git a/qapi/trace.json b/qapi/trace.json
> index 29c76256055..8533e378977 100644
> --- a/qapi/trace.json
> +++ b/qapi/trace.json
> @@ -16,8 +16,6 @@
>  # @TraceEventState:
>  #     State of a tracing event.
>  #
> -# @unavailable: The event is statically disabled.
> -#
>  # @disabled: The event is dynamically disabled.
>  #
>  # @enabled: The event is dynamically enabled.
> @@ -25,7 +23,7 @@
>  # Since: 2.2
>  ##
>  { 'enum': 'TraceEventState',
> -  'data': ['unavailable', 'disabled', 'enabled'] }
> +  'data': ['disabled', 'enabled'] }

No note in docs/about/removed-features.rst needed?

>  
>  ##
>  # @TraceEventInfo:
> @@ -69,6 +67,7 @@
   ##
   # @trace-event-set-state:
   #     Set the dynamic tracing state of events.
   #
   # @name: Event name pattern (case-sensitive glob).
   #
>  # @enable: Whether to enable tracing.
>  #
>  # @ignore-unavailable: Do not match unavailable events with @name.
> +#      Deprecated: since 11.2
>  #
>  # Since: 2.2
>  #

Are you trying to deprecate use of argument @ignore-unavailable?

If no, what are you trying to do?

If yes, this isn't how we do that.  Instead:

   ##
   # @trace-event-set-state:
   #     Set the dynamic tracing state of events.
   #
   # @name: Event name pattern (case-sensitive glob).
   #
   # @enable: Whether to enable tracing.
   #
   # @ignore-unavailable: Do not match unavailable events with @name.
   #
   # Features:
   #
   # @deprecated: Argument @ignore-unavailable is deperecated and does
   #     nothing.
   #
   # Since: 2.2
   #
   # .. qmp-example::
   #
   #     -> { "execute": "trace-event-set-state",
   #          "arguments": { "name": "qemu_memalign", "enable": true } }
   #     <- { "return": {} }
   ##
   { 'command': 'trace-event-set-state',
     'data': {'name': 'str', 'enable': 'bool',
              '*ignore-unavailable': { 'type': 'bool',
                                       'features': [ 'deprecated' ] } } }

with a matching update to docs/about/deprecated.rst.

[...]


Reply via email to