summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2018-01-02 17:36:27 -0800
committerHans Boehm <hboehm@google.com>2018-01-08 14:30:42 -0800
commitd2fb7df2c103e949d06af0757820fb29ba5a641e (patch)
treef53f56ad15f736fd98ac3abb7a5f0ffe8811b1f4 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9c1279d2ae27071db4f351904bcad0fca4afae48 (diff)
Only count uncleared ProxyMap refs when deciding to crash
Add a method to compute the size of a ProxyMap without cleared references. Use it in the crash decision. Report both counts, as well as the count after a forced GC before actually crashing. Rename the histogram generating function after a small refactoring to make that easier. When we crash, we now generate a message like the following (generated here with reduced thresholds): 01-03 01:40:52.273 4793 4947 E JavaBinder: java.lang.AssertionError: Binder ProxyMap has too many entries: 277 (total), 275 (uncleared), 257 (after GC). BinderProxy leak? after the histogram. Unfortunately, the intervening GC may take some time, and other intervening messages may sneak into the log between them. Experiments so far suggest that none of this greatly affects the decision when to die. But this eliminates uncertainty as to whether there was really a problem. Bug: 71353150 Test: Tested with reduced thresholds, and then booted AOSP. Change-Id: I53f24bae23eedcdb78a1c32296c65692b7bb2c42
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions