Fix libtracing_perfetto performance impact
1. Avoided checking isPerfettoSdkTracingEnabled on each tracing call. We already checked that before registering perfetto and if the flag was false, toPerfettoCategory will never return a valid category hence we'll fallback to atrace. 2. Added an isPerfettoRegistered check that encapsulates the sdk check for use in getEnabledCategories. This allows us skip the sdk check there We'll need to fix result of getEnabledCategories to only return enabled categories and not just registered ones, but since the flag is off this it's fine for now and can address in a separate cl. Test: atest libtracing_perfetto_tests Bug: 328942318 Bug: 303199244 Change-Id: Ic8fdebd20aba4ac75566c1a1590667891745b92a
Loading
Please register or sign in to comment