summaryrefslogtreecommitdiff
path: root/runtime/gc/heap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/gc/heap.cc')
-rw-r--r--runtime/gc/heap.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index b004566ed1..25ed652b41 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3913,9 +3913,9 @@ void Heap::BroadcastForNewAllocationRecords() const {
}
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;
{