Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 31a8dbc0 authored by Vishnu Nair's avatar Vishnu Nair
Browse files

Add synchronous SurfaceFlinger tracing

We want to collect traces without impacting composition so by default
we collect traces in another thread while holding a tracing lock when
current state is copied over to drawing state. But this has some
issues. If the tracing thread is not scheduled before the next frame
is composed, we may miss a state. If we need to collect composition
state then we may access states that are currently being modified by
the drawing thread.

To counter this the caller can pass in a TRACE_SYNC flag which will
force the trace to be collected in the drawing thread after
composition. This can be used by tests which don't care about the perf
impact caused by the sync tracing.

This change also fixes threading bugs highlighted in b/154155922

Finally we add a flag TRACE_BUFFERS to capture buffer latches as
well. This is used for Blast buffer tests.

Bug: 169849887, 153739621
Fixes: 154155922
Test: enable tracing with flags, on hwasan builds
Change-Id: I58512cdc98745398b460fa8e7798eb809bd2b0ae
parent 4283d657
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment