summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-04-15 14:21:33 -0700
committerMathieu Chartier <mathieuc@google.com>2015-04-15 14:42:50 -0700
commit10d6886c9ce3ed87431cf10d376a69c23950fa61 (patch)
tree52cfc18e941d78e480c5fdacda57721083b5e51f /runtime/gc/collector
parenta76a08fed88bd081bcc4d240f1ba3472a2acbbab (diff)
downloadart-10d6886c9ce3ed87431cf10d376a69c23950fa61.zip
art-10d6886c9ce3ed87431cf10d376a69c23950fa61.tar.gz
art-10d6886c9ce3ed87431cf10d376a69c23950fa61.tar.bz2
Disable parallel GC by default
Not using parallel GC seems to reduce avg pauses by ~0.1s on EvaluateAndApplyChanges. Avoiding creating the thread pool should help app launch slightly and reduce memory ussage. Change-Id: Iebec2a17701c76e4145b41d7c0b4f6dd17806efa
Diffstat (limited to 'runtime/gc/collector')
-rw-r--r--runtime/gc/collector/mark_sweep.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc
index bb8d876..e65d1f1 100644
--- a/runtime/gc/collector/mark_sweep.cc
+++ b/runtime/gc/collector/mark_sweep.cc
@@ -740,11 +740,7 @@ size_t MarkSweep::GetThreadCount(bool paused) const {
if (heap_->GetThreadPool() == nullptr || !heap_->CareAboutPauseTimes()) {
return 1;
}
- if (paused) {
- return heap_->GetParallelGCThreadCount() + 1;
- } else {
- return heap_->GetConcGCThreadCount() + 1;
- }
+ return (paused ? heap_->GetParallelGCThreadCount() : heap_->GetConcGCThreadCount()) + 1;
}
void MarkSweep::ScanGrayObjects(bool paused, uint8_t minimum_age) {