Refactor the garbage collector driver (GarbageCollector::Run).

Bug: 12687968

Change-Id: Ifc9ee86249f7938f51495ea1498cf0f7853a27e8
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index eb53ba9..5bf405d 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -680,6 +680,12 @@
   // Push an object onto the allocation stack.
   void PushOnAllocationStack(Thread* self, mirror::Object* obj);
 
+  // What kind of concurrency behavior is the runtime after? Currently true for concurrent mark
+  // sweep GC, false for other GC types.
+  bool IsGcConcurrent() const ALWAYS_INLINE {
+    return collector_type_ == kCollectorTypeCMS;
+  }
+
   // All-known continuous spaces, where objects lie within fixed bounds.
   std::vector<space::ContinuousSpace*> continuous_spaces_;
 
@@ -722,10 +728,6 @@
   // The mem-map which we will use for the non-moving space after the zygote is done forking:
   UniquePtr<MemMap> post_zygote_non_moving_space_mem_map_;
 
-  // What kind of concurrency behavior is the runtime after? Currently true for concurrent mark
-  // sweep GC, false for other GC types.
-  bool concurrent_gc_;
-
   // The current collector type.
   CollectorType collector_type_;
   // Which collector we will switch to after zygote fork.