Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 7e45874dac6ee91e28f9b481ad393ddae654a891
Author: Chris Craik <ccraik@google.com>
Date: Tue Aug 22 13:39:43 2023
Stream method tracing proto writes to Perfetto trace
Bug: 296905344
Test: Manual method tracing tested in ButtonBenchmark
Not a full fix, just an easy improvement to memory pressure when saving.
Change-Id: I6e853cec223c96e9cf610ccd1adcadae1aa23f26
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCaptureWrapper.kt
https://android-review.googlesource.com/2722258
Branch: androidx-main
commit 7e45874dac6ee91e28f9b481ad393ddae654a891
Author: Chris Craik <ccraik@google.com>
Date: Tue Aug 22 13:39:43 2023
Stream method tracing proto writes to Perfetto trace
Bug: 296905344
Test: Manual method tracing tested in ButtonBenchmark
Not a full fix, just an easy improvement to memory pressure when saving.
Change-Id: I6e853cec223c96e9cf610ccd1adcadae1aa23f26
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/perfetto/PerfettoCaptureWrapper.kt
pr...@google.com <pr...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 9e395ebd5dd7ee85b491fc975456493dd0183e2b
Author: Chris Craik <ccraik@google.com>
Date: Fri Aug 25 13:18:03 2023
Fully stream method trace to perfetto file
Test: ArtTraceTest
Test: LazyListScrollingBenchmark#scrollProgrammatically_newItemComposed # method tracing enabled for 20 iterations
Fixes: 296905344
Change drastically reduces resident memory when appending method trace
to perfetto, as we save less, and evict trace data periodically.
Now we appear to be able to safely write up to 600K methods, may now
be constrained by method trace file format.
Relnote: "Fix OOM crash when converting ART method trace -> perfetto
format."
Change-Id: I106bdf99084af10f26a4503b02ae74b9eef8add0
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/vmtrace/ArtTrace.kt
https://android-review.googlesource.com/2728493
Branch: androidx-main
commit 9e395ebd5dd7ee85b491fc975456493dd0183e2b
Author: Chris Craik <ccraik@google.com>
Date: Fri Aug 25 13:18:03 2023
Fully stream method trace to perfetto file
Test: ArtTraceTest
Test: LazyListScrollingBenchmark#scrollProgrammatically_newItemComposed # method tracing enabled for 20 iterations
Fixes: 296905344
Change drastically reduces resident memory when appending method trace
to perfetto, as we save less, and evict trace data periodically.
Now we appear to be able to safely write up to 600K methods, may now
be constrained by method trace file format.
Relnote: "Fix OOM crash when converting ART method trace -> perfetto
format."
Change-Id: I106bdf99084af10f26a4503b02ae74b9eef8add0
M benchmark/benchmark-common/src/main/java/androidx/benchmark/Profiler.kt
M benchmark/benchmark-common/src/main/java/androidx/benchmark/vmtrace/ArtTrace.kt
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).