Each backend generates the same trace_event_get_state_dynamic_by_id()
call for the TRACE....DSTATE() macro body, so when multiple backends
are enabled, the same check is repeated:
#define TRACE_TEST_WIBBLE_BACKEND_DSTATE() ( \
QEMU_TEST_WIBBLE_ENABLED() || \
trace_event_get_state_dynamic_by_id(TRACE_TEST_WIBBLE) || \
trace_event_get_state_dynamic_by_id(TRACE_TEST_WIBBLE) || \
trace_event_get_state_dynamic_by_id(TRACE_TEST_WIBBLE) || \
trace_event_get_state_dynamic_by_id(TRACE_TEST_WIBBLE) || \
tracepoint_enabled(qemu, test_wibble) || \
false)
Expanding the use of the 'backend.check_trace_event_get_state'
attr in the C header generator removes the duplication, in the
same way that the Rust generator already does.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20261102142844.3464712-17-berrange@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>