Change DisableGC to DisableMovingGC.

Also removed the WaitForConcurrentGC in IncrementDisableMovingGC
since we do not currently support any type of concurrent moving
collectors.

This fixes the performance regression introduced by waiting for the
concurrent GC which manifested itself in framework perf benchmarks
as a result of background compaction.

Change-Id: I524f9ab52e1992419626a27649f232ca6967b03d
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 0232b4d..52138d1 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -243,9 +243,9 @@
   // compaction related errors.
   bool IsInTempSpace(const mirror::Object* obj) const;
 
-  // Enables us to prevent GC until objects are released.
-  void IncrementDisableGC(Thread* self);
-  void DecrementDisableGC(Thread* self);
+  // Enables us to compacting GC until objects are released.
+  void IncrementDisableMovingGC(Thread* self);
+  void DecrementDisableMovingGC(Thread* self);
 
   // Initiates an explicit garbage collection.
   void CollectGarbage(bool clear_soft_references) LOCKS_EXCLUDED(Locks::mutator_lock_);
@@ -534,7 +534,7 @@
   void Compact(space::ContinuousMemMapAllocSpace* target_space,
                space::ContinuousMemMapAllocSpace* source_space);
 
-  bool StartGC(Thread* self) LOCKS_EXCLUDED(gc_complete_lock_);
+  bool StartGC(Thread* self, bool is_compacting) LOCKS_EXCLUDED(gc_complete_lock_);
   void FinishGC(Thread* self, collector::GcType gc_type) LOCKS_EXCLUDED(gc_complete_lock_);
 
   static ALWAYS_INLINE bool AllocatorHasAllocationStack(AllocatorType allocator_type) {
@@ -880,8 +880,8 @@
   // The current state of heap verification, may be enabled or disabled.
   HeapVerificationMode verify_object_mode_;
 
-  // GC disable count, error on GC if > 0.
-  size_t gc_disable_count_ GUARDED_BY(gc_complete_lock_);
+  // Compacting GC disable count, prevents compacting GC from running iff > 0.
+  size_t disable_moving_gc_count_ GUARDED_BY(gc_complete_lock_);
 
   std::vector<collector::GarbageCollector*> garbage_collectors_;
   collector::SemiSpace* semi_space_collector_;