summaryrefslogtreecommitdiff
path: root/runtime/art_method.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2024-05-02 17:49:12 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-05-03 09:57:14 +0000
commitb3d88b3f4b47b7635cbdab54dfdcbf866b9813ff (patch)
treea77d0d9ca5d0026b2fc309e5230665304ae64193 /runtime/art_method.cc
parent5a4566f39c3e22ecca1e88008af772c1a808ac9b (diff)
Revert "Reland^2 "Revamp JIT GC.""
This reverts commit eac7cd76d9a39a61c7fecbd3c3eb4f2932a3d55c. Reason for revert: Bot failure Change-Id: Ia4632c06ec88cff218d64a8087f762337cabc79e
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r--runtime/art_method.cc26
1 files changed, 4 insertions, 22 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 0b6b883bab..c8b16990b2 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -795,18 +795,16 @@ void ArtMethod::CopyFrom(ArtMethod* src, PointerSize image_pointer_size) {
const void* entry_point = GetEntryPointFromQuickCompiledCodePtrSize(image_pointer_size);
if (runtime->UseJitCompilation()) {
if (runtime->GetJit()->GetCodeCache()->ContainsPc(entry_point)) {
- SetNativePointer(EntryPointFromQuickCompiledCodeOffset(image_pointer_size),
- src->IsNative() ? GetQuickGenericJniStub() : GetQuickToInterpreterBridge(),
- image_pointer_size);
+ SetEntryPointFromQuickCompiledCodePtrSize(
+ src->IsNative() ? GetQuickGenericJniStub() : GetQuickToInterpreterBridge(),
+ image_pointer_size);
}
}
ClassLinker* class_linker = Runtime::Current()->GetClassLinker();
if (interpreter::IsNterpSupported() && class_linker->IsNterpEntryPoint(entry_point)) {
// If the entrypoint is nterp, it's too early to check if the new method
// will support it. So for simplicity, use the interpreter bridge.
- SetNativePointer(EntryPointFromQuickCompiledCodeOffset(image_pointer_size),
- GetQuickToInterpreterBridge(),
- image_pointer_size);
+ SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(), image_pointer_size);
}
// Clear the data pointer, it will be set if needed by the caller.
@@ -924,20 +922,4 @@ ALWAYS_INLINE static inline void DoGetAccessFlagsHelper(ArtMethod* method)
method->GetDeclaringClass<kReadBarrierOption>()->IsErroneous());
}
-void ArtMethod::SetEntryPointFromQuickCompiledCodePtrSize(
- const void* entry_point_from_quick_compiled_code, PointerSize pointer_size) {
- const void* current_entry_point = GetEntryPointFromQuickCompiledCodePtrSize(pointer_size);
- if (current_entry_point == entry_point_from_quick_compiled_code) {
- return;
- }
- jit::Jit* jit = Runtime::Current()->GetJit();
- SetNativePointer(EntryPointFromQuickCompiledCodeOffset(pointer_size),
- entry_point_from_quick_compiled_code,
- pointer_size);
- if (jit != nullptr &&
- jit->GetCodeCache()->ContainsPc(current_entry_point)) {
- jit->GetCodeCache()->AddZombieCode(this, current_entry_point);
- }
-}
-
} // namespace art