diff options
author | 2022-12-12 09:12:21 +0000 | |
---|---|---|
committer | 2022-12-12 15:57:57 +0000 | |
commit | a20ec9bb10d7ded8ae7d95d4de1e190d22260c73 (patch) | |
tree | 50b5a757c4aa9f5aa7c663d47d96474f538476a2 /runtime/class_linker.cc | |
parent | b9df137d1dbdab1fdca13bb459705b6603e9328b (diff) |
Fix clinit debug check in instrumentation.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --jit --interpreter
Change-Id: Idae620b0b8f9ed67574f5b785fdac3efcb534cfd
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 08131c5d88..07300d2733 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -2128,8 +2128,7 @@ bool ClassLinker::AddImageSpace( // Set image methods' entry point that point to the nterp trampoline to the // nterp entry point. This allows taking the fast path when doing a // nterp->nterp call. - DCHECK_IMPLIES(NeedsClinitCheckBeforeCall(&method), - method.GetDeclaringClass()->IsVisiblyInitialized()); + DCHECK(!method.StillNeedsClinitCheck()); method.SetEntryPointFromQuickCompiledCode(interpreter::GetNterpEntryPoint()); } else { method.SetEntryPointFromQuickCompiledCode(GetQuickToInterpreterBridge()); @@ -3504,10 +3503,9 @@ void ClassLinker::FixupStaticTrampolines(Thread* self, ObjPtr<mirror::Class> kla instrumentation::Instrumentation* instrumentation = runtime->GetInstrumentation(); for (size_t method_index = 0; method_index < num_direct_methods; ++method_index) { ArtMethod* method = klass->GetDirectMethod(method_index, pointer_size); - if (!NeedsClinitCheckBeforeCall(method)) { - continue; + if (method->NeedsClinitCheckBeforeCall()) { + instrumentation->UpdateMethodsCode(method, instrumentation->GetCodeForInvoke(method)); } - instrumentation->UpdateMethodsCode(method, instrumentation->GetCodeForInvoke(method)); } // Ignore virtual methods on the iterator. } |