summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorKweku Adams <kwekua@google.com>2019-05-23 16:23:48 -0700
committerKweku Adams <kwekua@google.com>2019-05-23 16:23:48 -0700
commit4af1b5084b6747a33791c35ce85daacd91555425 (patch)
treecc9748a5fbde50778e215fbf8deafb6087da39b9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent0a8fcb3a8b12f0f0f970a62de870bf1521e59b88 (diff)
Handling race condition when dumping heaps.
1. The IPC to ActivityThread.dumpHeap() dups the input file descriptor but closes it when the IPC returns. Since the heap dump is generated asynchronously, a race condition ensues between the returning close and the dump being generated. For the intra-system-process call, the race is with ActivityManagerService closing the created file descriptor. Duping the file descriptor on the ActivityThread side should deal with this. 2. For some reason, the file descriptor wasn't closed for native heap dumps. Closing the fd in those cases as well. 3. Catch the RuntimeException from Debug.dumpHprofData in case anything else was missed. Bug: 133424499 Test: adb shell am dumpheap com.android.systemui Test: adb shell am dumpheap system Test: Use the "Capture System Heap Dump" option in Developer Settings Change-Id: I44817161533359766250de04e35902587ea9cc40
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions