Fixed
Status Update
Comments
cc...@google.com <cc...@google.com> #2
Fixed with the following CL (missed tagging this bug):
There will be additional follow up work (handling new mainline versions that fix the issue), but we'll file separate bugs to improve that.
cc...@google.com <cc...@google.com> #3
How To Get Method Tracing Working in Microbench
Options:
1) Flash API 23 through 25
2) Flash API 31 through 33, and disable wifi/network on the device
Not connecting to the network prevents mainline updates. You can validate that your device hasn't taken a problematic mainline version with the following shell command:
adb shell cmd package list packages --show-versioncode --apex-only art
You should see e.g.:
package:com.google.android.art versionCode:320000000
If the first two digits of the version code are less than 34, you're good, method tracing will work and be on by default in microbench.
Description
After turning method tracing on in microbench by default in all cases, we have over time found multiple issues where runtime performance is drastically reduced after capturing a method trace, depending on OS version and ART mainline version.
We also found that it was necessary to suppress method traces on long running benchmarks to avoid ANRs, as even a single loop of a compose benchmark can take several seconds to trace. This made numbers and tracing behavior both less predictable, because duration of benchmark now defines whether it gets a method trace, since it's used to predict if simply taking a method trace on the UI thread will cause an ANR. See b/311412125
Currently, method tracing is off by default, everywhere, we want to turn it back on safely.
Tasks: