On Mon, Aug 04, 2025 at 11:20:37AM +0000, Tanish Desai wrote:
> This patch series eliminates unnecessary
> if (true) { no_check_foo(...) } blocks and
> integrates the no_check_foo(...) logic directly
> into trace_foo(...). This results in cleaner,
> more maintainable code generation.
>
> A new backend attribute, TRACE_EVENT_GET_STATE,
> is introduced. When enabled, it automatically
> generates conditional block :
> if (trace_event_get_state(...)) { ... }. The
> generate() function emits code within this
> conditional structure for that backend.
>
> Previously, without TRACE_EVENT_GET_STATE,
> each backend was required to manually implement
> out("if (trace_event_get_state(...)) {") in its
> generate() function, leading to code duplication.
FWIW, I rebased your patches on top of this series
just posted, which is how I found the two bugs
pointed out against the patches
https://lists.nongnu.org/archive/html/qemu-devel/2025-08/msg00942.html
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|