summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/mark_sweep.cc
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-04-08 16:21:52 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2014-04-08 16:38:57 -0700
commitdf386c551405ce9668e827584f744c6f098761fa (patch)
treeee0aeeb5e6b5575740a13877e6bbe5a51c7d8954 /runtime/gc/collector/mark_sweep.cc
parentb7a691f6398c55dacb3531d921e8cb298c3c8b8d (diff)
downloadart-df386c551405ce9668e827584f744c6f098761fa.zip
art-df386c551405ce9668e827584f744c6f098761fa.tar.gz
art-df386c551405ce9668e827584f744c6f098761fa.tar.bz2
GSS: Fix the bump pointer space only collection.
Fixes b/13912464 where the clear soft reference behavior accidentally disabled the bump pointer space only collection. Changed the collector name so that the GC logs would indicate the generational mode and the collection mode. Peformance enhancement: instead of triggering the whole heap collection every 5 collections, count the bytes promoted since the last whole heap collection and use it to decide when to trigger the whole heap collection. This improves MemAllocTest by 5-10% (N4 and host). Bug: 13912464 Bug: 11650816 Bug: 9986565 Change-Id: I653a0dca62a8b54adf69abe2940a41eac70f809b
Diffstat (limited to 'runtime/gc/collector/mark_sweep.cc')
-rw-r--r--runtime/gc/collector/mark_sweep.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index 944ef8d..bb41b57 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -129,7 +129,10 @@ void MarkSweep::InitializePhase() {
ReaderMutexLock mu(Thread::Current(), *Locks::heap_bitmap_lock_);
mark_bitmap_ = heap_->GetMarkBitmap();
}
-
+ if (!clear_soft_references_) {
+ // Always clear soft references if a non-sticky collection.
+ clear_soft_references_ = GetGcType() != collector::kGcTypeSticky;
+ }
// Do any pre GC verification.
timings_.NewSplit("PreGcVerification");
heap_->PreGcVerification(this);