Pass current thread as argument to alloc instrumentation.
Avoids recomputation in the hot allocation path when instrumentation is
enabled.
Change-Id: Ic6e7d7d0744f4756787f75d21fddd3c50280b588
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 50bb0c9..c8bb537 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -4375,10 +4375,7 @@
size_t depth;
};
-void Dbg::RecordAllocation(mirror::Class* type, size_t byte_count) {
- Thread* self = Thread::Current();
- CHECK(self != nullptr);
-
+void Dbg::RecordAllocation(Thread* self, mirror::Class* type, size_t byte_count) {
MutexLock mu(self, *Locks::alloc_tracker_lock_);
if (recent_allocation_records_ == nullptr) {
// In the process of shutting down recording, bail.