From dc9ce8dd209a8a47603b83a45ba5459ab506f650 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 20 May 2026 15:35:27 -0500 Subject: [PATCH] trace: update annotations even when not tracing This hopefully isn't ridiculously heavy. The heavy part is committing the flow array later, which is already gated by perfetto internally, so we don't have to protect anything here ourselves. This makes it easier to put flows in annotation arrays, because flows need to be kept up to date even when not tracing. Signed-off-by: Derek Foreman --- libweston/weston-trace.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libweston/weston-trace.h b/libweston/weston-trace.h index beb16f478..cfab9d9c6 100644 --- a/libweston/weston-trace.h +++ b/libweston/weston-trace.h @@ -86,7 +86,6 @@ } #define _WESTON_TRACE_ANNOTATE_ADD_GENERIC(k, v) \ - if (unlikely(util_perfetto_is_tracing_enabled())) { \ static_assert(sizeof(k) < WESTON_TRACE_MAX_KEY_LENGTH); \ _Generic((v), \ int: perfetto_annotate_int, \ @@ -98,8 +97,7 @@ const char *: perfetto_annotate_string, \ struct weston_buffer *: perfetto_annotate_buffer, \ const struct weston_buffer *: perfetto_annotate_buffer \ - ) (&__pd_annots, k, sizeof(k), v); \ - } + ) (&__pd_annots, k, sizeof(k), v); #define _WESTON_TRACE_ANNOTATE_ADD(k, v) \ do { \