OSDN Git Service

Clear (madvise) card table for CC
authorMathieu Chartier <mathieuc@google.com>
Mon, 24 Oct 2016 22:45:41 +0000 (15:45 -0700)
committerMathieu Chartier <mathieuc@google.com>
Tue, 25 Oct 2016 02:23:06 +0000 (19:23 -0700)
commit6e6078ab06e16bb4032b363316360f3b76685e30
tree539b5b28159f2b8e6a3893b03915c65c91474761
parent3209925b7c0e173741885e63f747af16dac78469
Clear (madvise) card table for CC

Since the cards are not really used, we can madvise them to reduce
RAM. Image and zygote cards are cleared in pause to prevent races
between with mutators.

Pause time goes up by only 1.5us on N6P maps:
(Paused)ClearCards: Sum: 755us 99% C.I. 0.250us-28us Avg: 1.540us Max: 28us

AOSP N6P before (60s after boot system wide CC):
4,194K: .GC
4,172K: .GC
4,110K: .GC

After:
3,253K: .GC
3,205K: .GC
3,245K: .GC

Bug: 12687968

Test: test-art-host

Change-Id: I3194b5b8044c2dca427302c32d9974920fecb289
runtime/gc/accounting/card_table-inl.h
runtime/gc/accounting/card_table.cc
runtime/gc/accounting/card_table.h
runtime/gc/accounting/mod_union_table.cc
runtime/gc/accounting/mod_union_table.h
runtime/gc/accounting/mod_union_table_test.cc
runtime/gc/accounting/space_bitmap.cc
runtime/gc/collector/concurrent_copying.cc
runtime/gc/heap.cc
runtime/mem_map.cc
runtime/mem_map.h