Avoid suspending for alloc trace enabling when already suspended.
Bug: 17499772
(cherry picked from commit 1d6ee090fddd4bfd35c304d6ceb929d5c529dfcc)
Change-Id: Id09809c476c685f0a197ee75bb08638931364efd
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index df51973..6c37402 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -4388,7 +4388,7 @@
recent_allocation_records_ = new AllocRecord[alloc_record_max_];
CHECK(recent_allocation_records_ != nullptr);
}
- Runtime::Current()->GetInstrumentation()->InstrumentQuickAllocEntryPoints();
+ Runtime::Current()->GetInstrumentation()->InstrumentQuickAllocEntryPoints(false);
} else {
{
ScopedObjectAccess soa(self); // For type_cache_.Clear();
@@ -4404,7 +4404,7 @@
type_cache_.Clear();
}
// If an allocation comes in before we uninstrument, we will safely drop it on the floor.
- Runtime::Current()->GetInstrumentation()->UninstrumentQuickAllocEntryPoints();
+ Runtime::Current()->GetInstrumentation()->UninstrumentQuickAllocEntryPoints(false);
}
}