Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Chris Craik <
Link:
Support truncated process names in built-in macrobench Perfetto queries
Expand for full commit details
Support truncated process names in built-in macrobench Perfetto queries
Test: TraceSectionMetricTest#truncatedProcessName
Test: StartupMetricTest#fixedApi29ColdProcessNameTruncated
Fixes: 377565760
Relnote: """Fixed issue where (especially short) traces could be
captured that wouldn't report measurement from built-in Macrobenchmark
Metrics, due to the process name being truncated within the Perfetto
trace. Now macrobenchmark works around this issue by looking for the
truncated package name in all built-in queries, in addition to the
expected package name. Note that custom TraceMetric implementations or
other direct callers of PerfettoSession.query can implement this same
behavior by changing `process.name LIKE "$packageName"` in a Perfetto
query to instead be `(process.name LIKE "$packageName" OR process.name LIKE "$(packageName.takeLast(15))")`."""
Change-Id: I5bf01b5a9378f3314a1d5a7e4d7968b444cefe89
Files:
- M
benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/TraceSectionMetricTest.kt
- M
benchmark/benchmark-macro/src/androidTest/java/androidx/benchmark/macro/perfetto/StartupTimingQueryTest.kt
- M
benchmark/benchmark-macro/src/main/java/androidx/benchmark/perfetto/PerfettoTraceProcessor.kt
Hash: 73234110baf298cf52c018fbf3c9fe68e3c13a19
Date: Tue Nov 05 14:17:49 2024
na...@google.com <na...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-macro:1.4.0-alpha05
ja...@gmail.com <ja...@gmail.com> #4
Check this
Description
Tomas hit this today, where perfetto didn't capture process names, and was stuck with the sched provided package name.
We've removed our workarounds for truncated process names a while back when perfetto updates made the problem far less frequent, but they're fairly simple to support.