summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorHans Boehm <hboehm@google.com>2018-10-12 16:15:45 -0700
committerHans Boehm <hboehm@google.com>2018-12-12 21:03:14 -0800
commitc220f981809d655fb061c92a581fd6fc4df4da5c (patch)
tree77f494f865e9b3c24340b5761a5d762408eb3a78 /compiler/optimizing/graph_visualizer.cc
parent5de31a1dd5ac6e12b37517550a609b9c0576f685 (diff)
Change GC triggering to use mallinfo()
Revise the test of whether we should collect based on native allocation to be based on mallinfo. Make the GC triggering threshold for native allocations grow somewhat with the Java heap size to account for the added cost of Java collection. We currently compromise between that goal and a desire to avoid drastic changes that might provoke new heap growth issues. It does now take more native allocations to trigger a GC earlier in the normal Java GC cycle than later in the cycle, as it should. Add the notifyNativeAllocations() interface to replace registerNativeAllocation() in the common case in which native memory is completely allocated via malloc(), and thus no longer needs to be accounted for separately. Arrange for it to be called much more rarely, since its cost is higher, and we can save time by not going through JNI on every allocation. Add 175-alloc-bignums test. Cleanups/fixes: Fix race in IsOutOfMemoryOnAllocation. Rename max_allowed_footprint_ to avoid suggesting it's a hard limit. It wasn't and it isn't. Make it atomic, since it's concurrently modified. Fix a few cases in which unsigned counters could become negative. I think the only bad consequences of this were weird log messages. Fix integer sizes/signedness around GrowForUtilization. Use uint64_t only when we can exceed address space size, and size_t otherwise. Improve overflow checking. Make allocator or collector tests check the important kinds first, since they're not always known at compile time. Bug: 111447610 Test: Built and booted AOSP. Ran 175-alloc-big-bignums. Change-Id: I55deac86622019fb85bbd569c3ae8afab2d13d9a
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions