From 8a8cc8486a18e49494fed56754b0c0b939ca050f Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 29 Apr 2026 10:06:06 -0500 Subject: [PATCH] perfetto: Put the damage event in the flow instead of the clean event. The Damaged event is the result of a content update application on a surface. So it makes sense to put this in the flow for the surface. The Clean event comes from a render completion that could be driven by any surface, so it doesn't really make sense to consider it part of surface flow. Signed-off-by: Derek Foreman --- libweston/timeline-perfetto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libweston/timeline-perfetto.c b/libweston/timeline-perfetto.c index c8c2e9e71..54dfbb341 100644 --- a/libweston/timeline-perfetto.c +++ b/libweston/timeline-perfetto.c @@ -143,7 +143,7 @@ weston_timeline_perfetto(struct weston_log_scope *timeline_scope, break; case TLP_CORE_FLUSH_DAMAGE: WESTON_TRACE_TIMESTAMP_END("Damaged", surface->damage_track_id, CLOCK_MONOTONIC, now_ns); - WESTON_TRACE_TIMESTAMP_BEGIN("Clean", surface->damage_track_id, surface->flow_id, CLOCK_MONOTONIC, now_ns); + WESTON_TRACE_TIMESTAMP_BEGIN("Clean", surface->damage_track_id, 0, CLOCK_MONOTONIC, now_ns); break; case TLP_CORE_REPAINT_BEGIN: WESTON_TRACE_TIMESTAMP_END("Scheduled", output->paint_track_id, CLOCK_MONOTONIC, now_ns); @@ -162,7 +162,7 @@ weston_timeline_perfetto(struct weston_log_scope *timeline_scope, case TLP_CORE_COMMIT_DAMAGE: WESTON_TRACE_TIMESTAMP_END("Clean", surface->damage_track_id, CLOCK_MONOTONIC, now_ns); WESTON_TRACE_TIMESTAMP_END("Damaged", surface->damage_track_id, CLOCK_MONOTONIC, now_ns); - WESTON_TRACE_TIMESTAMP_BEGIN("Damaged", surface->damage_track_id, 0, CLOCK_MONOTONIC, now_ns); + WESTON_TRACE_TIMESTAMP_BEGIN("Damaged", surface->damage_track_id, surface->flow_id, CLOCK_MONOTONIC, now_ns); break; case TLP_RENDERER_GPU_BEGIN: WESTON_TRACE_TIMESTAMP_BEGIN("Active", output->gpu_track_id, 0, CLOCK_MONOTONIC, gpu_ns);