Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit f8a6b638b1e3f2d63714570d64084508e15ab0cf
Author: Chris Craik <ccraik@google.com>
Date: Wed May 22 14:20:38 2024
Defer simpleperf stack sampling conversion off main thread
Test: ProfilerTest
Test: LazyListScrollingBenchmark#scrollProgrammatically_newItemComposed # locked mokey
Fixes: 342237318
Relnote: "Reduced chance of stack sampling causing
measureRepeatedOnMainThread from hitting main thread hard timeout by
moving stack sampling conversion off main thread."
Change-Id: I487a8df198f66a1af0001d2f0faece5288eff178
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateConfigTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ProfilerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
https://android-review.googlesource.com/3098138
Branch: androidx-main
commit f8a6b638b1e3f2d63714570d64084508e15ab0cf
Author: Chris Craik <ccraik@google.com>
Date: Wed May 22 14:20:38 2024
Defer simpleperf stack sampling conversion off main thread
Test: ProfilerTest
Test: LazyListScrollingBenchmark#scrollProgrammatically_newItemComposed # locked mokey
Fixes: 342237318
Relnote: "Reduced chance of stack sampling causing
measureRepeatedOnMainThread from hitting main thread hard timeout by
moving stack sampling conversion off main thread."
Change-Id: I487a8df198f66a1af0001d2f0faece5288eff178
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/BenchmarkStateConfigTest.kt
M benchmark/benchmark-common/src/androidTest/java/androidx/benchmark/ProfilerTest.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/BenchmarkState.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-common:1.3.0-rc01
Description
Logcat:https://paste.googleplex.com/4815901388177408
Able to repro (though the crash itself is infrequent), added some tracing to see that it takes us 9 seconds to stop simpleperf, 5.4s of which is converting simpleperf to the stable output format that studio requires. See screenshot.
Have a fix that will defer this conversion off the main thread, which reduces ANR risk (and should avoid need for tweaking ANR avoidance hard deadline).