diff options
author | Lei Li <lei.l.li@intel.com> | 2015-01-15 11:55:26 +0800 |
---|---|---|
committer | Haitao Feng <haitao.feng@intel.com> | 2015-01-26 10:34:05 +0800 |
commit | 4add3b4fa38ec42bb3c71d01cf70bce8e9a9fb4e (patch) | |
tree | 4b8bbd52a4bd139d5101e6a1f99f9a5748e6c1ed /runtime/gc/collector/mark_sweep.cc | |
parent | 336247fa6deba2948f5ede1df806f48cf67c790a (diff) | |
download | art-4add3b4fa38ec42bb3c71d01cf70bce8e9a9fb4e.tar.gz art-4add3b4fa38ec42bb3c71d01cf70bce8e9a9fb4e.tar.bz2 art-4add3b4fa38ec42bb3c71d01cf70bce8e9a9fb4e.zip |
ART: clear dirty cards of alloc space for MS/CMS partial and full GCs
For MS/CMS partial and full GCs, we could clear the dirty cards of alloc
space when we process cards as we care about the dirty cards after GC
starts.
Change-Id: I1f9b32b20d75979387bc5d26b0cf9a256dcf20b6
Signed-off-by: Lei Li <lei.l.li@intel.com>
Diffstat (limited to 'runtime/gc/collector/mark_sweep.cc')
-rw-r--r-- | runtime/gc/collector/mark_sweep.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc index 04fb6941ba..64d2cc4033 100644 --- a/runtime/gc/collector/mark_sweep.cc +++ b/runtime/gc/collector/mark_sweep.cc @@ -217,7 +217,7 @@ void MarkSweep::PreCleanCards() { Thread* self = Thread::Current(); CHECK(!Locks::mutator_lock_->IsExclusiveHeld(self)); // Process dirty cards and add dirty cards to mod union tables, also ages cards. - heap_->ProcessCards(GetTimings(), false); + heap_->ProcessCards(GetTimings(), false, true, false); // The checkpoint root marking is required to avoid a race condition which occurs if the // following happens during a reference write: // 1. mutator dirties the card (write barrier) @@ -255,7 +255,8 @@ void MarkSweep::MarkingPhase() { BindBitmaps(); FindDefaultSpaceBitmap(); // Process dirty cards and add dirty cards to mod union tables. - heap_->ProcessCards(GetTimings(), false); + // If the GC type is non sticky, then we just clear the cards instead of ageing them. + heap_->ProcessCards(GetTimings(), false, true, GetGcType() != kGcTypeSticky); WriterMutexLock mu(self, *Locks::heap_bitmap_lock_); MarkRoots(self); MarkReachableObjects(); |