Remove static GcRoot<>s from Class and ClassExt.
And clean up gc_root includes in runtime/mirror/.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Ib5c42a3a892ced4440720350a63a94bcf3a1ca75
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index b004566..25ed652 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3913,9 +3913,9 @@
}
void Heap::CheckGcStressMode(Thread* self, ObjPtr<mirror::Object>* obj) {
+ DCHECK(gc_stress_mode_);
auto* const runtime = Runtime::Current();
- if (gc_stress_mode_ && runtime->GetClassLinker()->IsInitialized() &&
- !runtime->IsActiveTransaction() && mirror::Class::HasJavaLangClass()) {
+ if (runtime->GetClassLinker()->IsInitialized() && !runtime->IsActiveTransaction()) {
// Check if we should GC.
bool new_backtrace = false;
{