Revert^3 "Ensure that methods requiring interpreter entrypoint always have it."
This reverts commit 4b3dec38319a8d4af51e401ca13987cf0c2dd98d.
Reason for revert: Failing on debuggable-gcstress
Bug: 62821960
Change-Id: Id143ffa2d9c379566328a03f3cbce1713ae31e51
Test: None
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index a32c717..f727690 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -1294,9 +1294,9 @@
// with the interpreter.
code = GetQuickToInterpreterBridge();
} else if (invoke_type == kStatic) {
- // Class is still initializing. The entrypoint contains the trampoline, so we cannot return
- // it. Instead, ask the class linker what is the actual code that needs to be invoked.
- code = linker->GetQuickEntrypointFor(called);
+ // Class is still initializing, go to oat and grab code (trampoline must be left in place
+ // until class is initialized to stop races between threads).
+ code = linker->GetQuickOatCodeFor(called);
} else {
// No trampoline for non-static methods.
code = called->GetEntryPointFromQuickCompiledCode();