From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
xen-devel@lists.xenproject.org, qemu-ppc@nongnu.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Eric Blake" <eblake@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Anthony PERARD" <anthony@xenproject.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Alexey Kardashevskiy" <aik@ozlabs.ru>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Helge Deller" <deller@gmx.de>,
"Stefan Hajnoczi" <stefanha@redhat.com>
Subject: Re: [PULL v2 23/25] trace: stop tracking static disabled state
Date: Thu, 12 Nov 2026 16:43:37 +0000 [thread overview]
Message-ID: <avXsuTvYht2mR8d4@redhat.com> (raw)
In-Reply-To: <87se1efa5p.fsf@pond.sub.org>
On Fri, Nov 06, 2026 at 12:53:54PM +0100, Markus Armbruster wrote:
> I missed this, because I wasn't cc'ed.
>
> Stefan Hajnoczi <stefanha@redhat.com> writes:
>
> > From: Daniel P. Berrangé <berrange@redhat.com>
> >
> > 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 <marcandre.lureau@redhat.com>
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > Message-id: 20261102142844.3464712-24-berrange@redhat.com
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>
> [...]
>
> > 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?
Yes it is required.
> > @@ -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?
Yes.
> If yes, this isn't how we do that. Instead:
/face-palm
>
> ##
> # @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.
Yes, will CC you on the fix.
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-11-12 16:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 20:17 [PULL v2 00/25] Tracing patches Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 01/25] osdep: add 'ignore_value(x)' macro Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 02/25] trace: use 'ignore_value()' instead of a dummy variable Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 03/25] trace: fix handling of char** in UST backend Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 04/25] hw/xen: replace "long unsigned int" with "unsigned long " for dtrace Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 05/25] trace: block use of "long int" " Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 06/25] trace: drop unused trace_event_set_state_dynamic_init() Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 07/25] trace: remove obsolete references to vcpu property Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 08/25] trace: drop 'id' from TraceEvent struct when not required Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 09/25] trace: change "DSTATE" variables from uint16_t to uint8_t Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 10/25] trace: add testing of 'nop' trace backend Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 11/25] trace: don't emit TraceEvent structs when 'nop' backend is used Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 12/25] trace: add test of generation with all backends enabled Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 13/25] trace: remove redundant headers from simple trace backend code Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 14/25] trace: include probe name in Rust format strings Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 15/25] trace: add missing newline in ftrace Rust format string Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 16/25] trace: eliminate dupe trace_event_get_state_dynamic_by_id() calls Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 17/25] audio: remove mistaken use of trace_event_get_state() Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 18/25] hw/ppc: " Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 19/25] monitor: " Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 20/25] trace: include qemu_loglevel_mask(LOG_TRACE) in guard Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 21/25] target/hppa: use PRIx64 in trace-events Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 22/25] trace: remove "disable" property from trace files Stefan Hajnoczi
2026-11-04 20:17 ` [PULL v2 23/25] trace: stop tracking static disabled state Stefan Hajnoczi
2026-11-06 11:53 ` Markus Armbruster
2026-11-12 16:43 ` Daniel P. Berrangé [this message]
2026-11-04 20:18 ` [PULL v2 24/25] trace: remove parsing of "disable" event property Stefan Hajnoczi
2026-11-04 20:18 ` [PULL v2 25/25] trace: remove 'trace_event_get_state' wrapper Stefan Hajnoczi
2026-11-05 15:23 ` [PULL v2 00/25] Tracing patches Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avXsuTvYht2mR8d4@redhat.com \
--to=berrange@redhat.com \
--cc=aik@ozlabs.ru \
--cc=anthony@xenproject.org \
--cc=armbru@redhat.com \
--cc=deller@gmx.de \
--cc=eblake@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sstabellini@kernel.org \
--cc=stefanha@redhat.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox