Add GC coverage test for moving GC
Adds testing coverage for collector transitions and homogeneous space
compaction.
Bug: 10808403
Change-Id: Ia79fecb47c33fc95d940243d6cb1068e9ee9dc9a
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 85688ae..8bffe5e 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -105,6 +105,8 @@
kSuccess,
// Reject due to disabled moving GC.
kErrorReject,
+ // Unsupported due to the current configuration.
+ kErrorUnsupported,
// System is shutting down.
kErrorVMShuttingDown,
};
@@ -753,6 +755,10 @@
void DisableGCForShutdown() REQUIRES(!*gc_complete_lock_);
+ // Create a new alloc space and compact default alloc space to it.
+ HomogeneousSpaceCompactResult PerformHomogeneousSpaceCompact() REQUIRES(!*gc_complete_lock_);
+ bool SupportHomogeneousSpaceCompactAndCollectorTransitions() const;
+
private:
class ConcurrentGCTask;
class CollectorTransitionTask;
@@ -905,9 +911,6 @@
// Find a collector based on GC type.
collector::GarbageCollector* FindCollectorByGcType(collector::GcType gc_type);
- // Create a new alloc space and compact default alloc space to it.
- HomogeneousSpaceCompactResult PerformHomogeneousSpaceCompact() REQUIRES(!*gc_complete_lock_);
-
// Create the main free list malloc space, either a RosAlloc space or DlMalloc space.
void CreateMainMallocSpace(MemMap* mem_map,
size_t initial_size,