ART: Fix allocation entrypoint instrumentation
Fix the unstarted-runtime case. Special-case the reset call to
the current thread, only.
Bug: 31684277
Test: m test-art-host
Change-Id: Ie8f8f24b2a6041344266a4e6b6bf8ddd9a0352a5
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index a73970b..bed489f 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -647,7 +647,11 @@
} else {
MutexLock mu(self, *Locks::runtime_shutdown_lock_);
SetQuickAllocEntryPointsInstrumented(instrumented);
- ResetQuickAllocEntryPoints();
+
+ // Note: ResetQuickAllocEntryPoints only works when the runtime is started. Manually run the
+ // update for just this thread.
+ ResetQuickAllocEntryPointsForThread(self, nullptr);
+
alloc_entrypoints_instrumented_ = instrumented;
}
}