summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/mark_sweep.h
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2014-03-20 12:03:02 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2014-03-20 12:37:57 -0700
commit3e41780cb3bcade3b724908e00443a9caf6977ef (patch)
tree7e112e8b3c5c7b13a52cac482bf51b84cf12e7d4 /runtime/gc/collector/mark_sweep.h
parentf2a0d91c9307819c070133e02ee04505b268b75d (diff)
downloadart-3e41780cb3bcade3b724908e00443a9caf6977ef.zip
art-3e41780cb3bcade3b724908e00443a9caf6977ef.tar.gz
art-3e41780cb3bcade3b724908e00443a9caf6977ef.tar.bz2
Refactor the garbage collector driver (GarbageCollector::Run).
Bug: 12687968 Change-Id: Ifc9ee86249f7938f51495ea1498cf0f7853a27e8
Diffstat (limited to 'runtime/gc/collector/mark_sweep.h')
-rw-r--r--runtime/gc/collector/mark_sweep.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h
index b117b20..937d726 100644
--- a/runtime/gc/collector/mark_sweep.h
+++ b/runtime/gc/collector/mark_sweep.h
@@ -68,19 +68,25 @@ class MarkSweep : public GarbageCollector {
virtual void InitializePhase() OVERRIDE;
virtual void MarkingPhase() OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- virtual bool HandleDirtyObjectsPhase() OVERRIDE EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);
+ virtual void HandleDirtyObjectsPhase() OVERRIDE EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_);
virtual void ReclaimPhase() OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
virtual void FinishPhase() OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
virtual void MarkReachableObjects()
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_);
- virtual bool IsConcurrent() const OVERRIDE;
+ bool IsConcurrent() const {
+ return is_concurrent_;
+ }
virtual GcType GetGcType() const OVERRIDE {
return kGcTypeFull;
}
+ virtual CollectorType GetCollectorType() const OVERRIDE {
+ return is_concurrent_ ? kCollectorTypeCMS : kCollectorTypeMS;
+ }
+
// Initializes internal structures.
void Init();