Fix a crash with -XX:DumpGCPerformanceOnShutdown.
DumpGcPerformanceInfo() could call RosAllocSpace::InspectAllRosAlloc()
which needs the thread list to be still alive. Fix by moving the
DumpGcPerformanceInfo() call from the Heap destructor up to the
beginning of the Runtime destructor so that the thread list is still
alive when it's called.
Bug: 11830901
Change-Id: Ib094d60916943c8cb1d4b769d805b4ca03269f90
diff --git a/runtime/runtime.h b/runtime/runtime.h
index d5ad299..0140ddb 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -562,6 +562,9 @@
// As returned by ClassLoader.getSystemClassLoader().
jobject system_class_loader_;
+ // If true, then we dump the GC cumulative timings on shutdown.
+ bool dump_gc_performance_on_shutdown_;
+
DISALLOW_COPY_AND_ASSIGN(Runtime);
};