+102
−0
+72
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
- Replace ThreadLocal<Int> with ThreadLocal<MutableInt> for better performance. - Make the ThreadLocal<MutableInt> a top-level val since since only one instance is needed per-thread (this will reduce memory overhead). - Fix issue where traceCoroutine() would write to the wrong thread-local after a suspension point. - Add benchmark tests for thread-local usage so we can decide on which style is most performant for our tracing use-case. - Replace nullable slices type with lateinit. - idle() shadow Looper in Robolectric tests so that main dispatcher can run. Bug: 351054475 Test: atest CoroutineTracingPerfTests Flag: com.android.systemui.coroutine_tracing Change-Id: I3619fb2f75eef845374ec76b157fe3a7f8cb5e35