summaryrefslogtreecommitdiff
path: root/runtime/native/java_lang_VMClassLoader.cc
diff options
context:
space:
mode:
author Ioannis Ilkos <ilkos@google.com> 2022-11-13 20:14:10 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-12-01 23:32:14 +0000
commit7dde6edda2bc0091f54a2d07ff80d124090fa964 (patch)
treec49e7cd2677c3acb28f9ea59df3503db27bda62d /runtime/native/java_lang_VMClassLoader.cc
parentdd161502900d8d28aca56c17eab9045770917a91 (diff)
Grab perfetto heap dump on OOME
In order to make OutOfMemoryErrors actionable, enable collecting heap dumps at the time of the error when there is a present tracing session. For now userdebug-only This change introduces a new hook which is used by the existing perfetto plugin to collect the data. Usage: Setup a perfetto tracing session using data source android.java_hprof.oom, with a START_TRACING trigger activated by "com.android.telemetry.art-outofmemory" Important points: - Unlike the current impl, we need to block the execution while we collect the data. This is because propagating the OOME will result in the process exiting (and cleanup will eliminate the entire cgroup, including the heap dump children) - Processes do not know whether a START_TRACING session exists but nevertheless need to wait for the producer start signal (in case one exists). We wait up to 500ms which will delay all OOMing processes. For more details see go/art-oom-heap-dump Test: manual system_server OOME (collected heap dump, verified execution resumes without a tracing session) Bug: 211178923 Change-Id: I90e260fbc6f113e77d00f0c958551fb561babb4e
Diffstat (limited to 'runtime/native/java_lang_VMClassLoader.cc')
0 files changed, 0 insertions, 0 deletions