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

Commit a7a1ed54 authored by Zimuzo Ezeozue's avatar Zimuzo Ezeozue
Browse files

Fix perfetto category registration order

In the tracinglib, a category is registered but sysui
perfetto registration hasn't happened yet. This leads
to a crash in the perfetto c sdk.

Ideally, the Java layer (or c layer) should avoid crashing
in this case. In the meantime, we call PerfettoTrace#register
right before Category#register. This could attempt perfetto
registration twice, but the second one will no-op.

Test: atest NexusLauncherOutOfProcTests:com.android.quickstep.TaplTestsQuickstep#testOverviewActions
Bug: 397923810
Flag: android.os.perfetto_sdk_tracing_v2
Change-Id: I20d342a87b02451d83072fc81132bb0021dfb1b5
parent d38edc36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ private object PerfettoTraceConfig {

    init {
        if (android.os.Flags.perfettoSdkTracingV2()) {
            PerfettoTrace.register(/* isBackendInProcess */ false)
            COROUTINE_CATEGORY.register()
        }
    }