diff --git a/libweston/surface-state.c b/libweston/surface-state.c index 3e8765841..633497617 100644 --- a/libweston/surface-state.c +++ b/libweston/surface-state.c @@ -204,10 +204,9 @@ weston_surface_attach(struct weston_surface *surface, struct weston_buffer *old_buffer = surface->buffer_ref.buffer; enum weston_paint_node_status pnode_changes = WESTON_PAINT_NODE_CLEAN; - WESTON_TRACE_BEGIN_ANNOTATION(); - WESTON_TRACE_ANNOTATE(("surface", surface->internal_name), - ("new buffer", buffer)); - WESTON_TRACE_ANNOTATE_FUNC_FLOW(&surface->flow_id); + WESTON_TRACE_ANNOTATE_FUNC_FLOW(&surface->flow_id, + ("surface", surface->internal_name), + ("new buffer", buffer)); if (!buffer) { if (weston_surface_is_mapped(surface)) { diff --git a/libweston/weston-trace.h b/libweston/weston-trace.h index 031cb8327..9e1346920 100644 --- a/libweston/weston-trace.h +++ b/libweston/weston-trace.h @@ -265,7 +265,9 @@ _weston_trace_scope_end(int *scope) #define WESTON_TRACE_ANNOTATE_FUNC() \ _WESTON_TRACE_ANNOTATE_FUNC(__func__) -#define WESTON_TRACE_ANNOTATE_FUNC_FLOW(id) \ +#define WESTON_TRACE_ANNOTATE_FUNC_FLOW(id, ...) \ + _WESTON_TRACE_BEGIN_ANNOTATION(); \ + WESTON_TRACE_ANNOTATE(__VA_ARGS__) \ _WESTON_TRACE_ANNOTATE_FUNC_FLOW(id, __func__) #define FORCE_RECURSE ()