summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/sticky_mark_sweep.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-02-24 09:58:40 -0800
committerMathieu Chartier <mathieuc@google.com>2014-02-24 18:12:28 -0800
commitdda54f59271464b5a72bf4cde6d9010e8dc1f337 (patch)
tree7f5e05654a2fa4d3368d87539ec928a095f617a6 /runtime/gc/collector/sticky_mark_sweep.cc
parent3fcf18e25241253f23efbeebe77b2a4c4a7c54d3 (diff)
downloadart-dda54f59271464b5a72bf4cde6d9010e8dc1f337.zip
art-dda54f59271464b5a72bf4cde6d9010e8dc1f337.tar.gz
art-dda54f59271464b5a72bf4cde6d9010e8dc1f337.tar.bz2
Card pre-cleaning.
We now pre-clean cards before the pause in the concurrent mark sweep collectors. This provides substantial a pause time reduction for GC iterations which have a lot of dirty cards. The only downside is a slight GC time increase for large heaps. Benchmark FormulaEvaluationActions.EvaluateAndApplyChanges: Before: Partial average pause: 5.47ms Sticky average pause: 2.91ms Total GC time: 25.8s After: Partial average pause: 1.98ms Sticky average pause: 1.66ms Total GC time: 27.0s Benchmark score difference in the noise. Change-Id: If9f01f8c1501f122e19432438108d48e723b332e
Diffstat (limited to 'runtime/gc/collector/sticky_mark_sweep.cc')
-rw-r--r--runtime/gc/collector/sticky_mark_sweep.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/gc/collector/sticky_mark_sweep.cc b/runtime/gc/collector/sticky_mark_sweep.cc
index 9e3adb4..450445e 100644
--- a/runtime/gc/collector/sticky_mark_sweep.cc
+++ b/runtime/gc/collector/sticky_mark_sweep.cc
@@ -53,6 +53,8 @@ void StickyMarkSweep::MarkReachableObjects() {
// TODO: Not put these objects in the mark stack in the first place.
mark_stack_->Reset();
RecursiveMarkDirtyObjects(false, accounting::CardTable::kCardDirty - 1);
+ // Pre clean dirtied cards to reduce pauses.
+ PreCleanCards();
}
void StickyMarkSweep::Sweep(bool swap_bitmaps) {