diff options
| author | 2024-03-12 12:37:53 +0000 | |
|---|---|---|
| committer | 2024-03-12 21:45:48 +0000 | |
| commit | 81deab754e4728f98e09196528e0c3777ca70ed8 (patch) | |
| tree | ccdde83e6ecd8b84322245b05f33af870366f830 /libs/ultrahdr/jpegencoderhelper.cpp | |
| parent | b8aebd579c5e8d8ad9bded8a0ce742cdb44d26d1 (diff) | |
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
Diffstat (limited to 'libs/ultrahdr/jpegencoderhelper.cpp')
0 files changed, 0 insertions, 0 deletions