OSDN Git Service

Use partial TLAB regions
authorMathieu Chartier <mathieuc@google.com>
Wed, 19 Apr 2017 00:46:23 +0000 (17:46 -0700)
committerMathieu Chartier <mathieuc@google.com>
Thu, 20 Apr 2017 04:26:56 +0000 (21:26 -0700)
commit6bc7774426cc0b6bbab5566fa62b3c509455e583
tree06c47a48c43924e8cdc80ed3ec31b8fddb4b39b6
parent8d0f3aaf28358697ec812955cdf975ca6c6ff901
Use partial TLAB regions

Instead of having 256K TLAB regions, have 256K TLABs split into
16K regions. This fixes pathological cases with multithreaded
allocation that caused many GCs since each thread reserving
256K would often bump the counter past the GC start threshold. Now
threads only bump the counter every 16K.

System wide results (average of 5 samples on N6P):
Total GC time 60s after starting shell: 45s -> 24s
Average .Heap PSS 60s after starting shell: 57900k -> 58682k

BinaryTrees gets around 5% slower, numbers are noisy.

Boot time: 13.302 -> 12.899 (average of 100 runs)

Bug: 35872915
Bug: 36216292

Test: test-art-host

(cherry picked from commit bf48003fa32d2845f2213c0ba31af6677715662d)

Change-Id: I5ab22420124eeadc0a53519c70112274101dfb39
12 files changed:
runtime/asm_support.h
runtime/gc/allocator_type.h
runtime/gc/heap-inl.h
runtime/gc/heap.cc
runtime/gc/space/bump_pointer_space.cc
runtime/gc/space/region_space-inl.h
runtime/gc/space/region_space.cc
runtime/gc/space/region_space.h
runtime/oat.h
runtime/thread-inl.h
runtime/thread.cc
runtime/thread.h