diff --git a/src/hotspot/cpu/zero/nativeInst_zero.cpp b/src/hotspot/cpu/zero/nativeInst_zero.cpp deleted file mode 100644 index 6b6e0eecad2..00000000000 --- a/src/hotspot/cpu/zero/nativeInst_zero.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. - * Copyright 2008 Red Hat, Inc. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "asm/assembler.inline.hpp" -#include "entry_zero.hpp" -#include "interpreter/zero/zeroInterpreter.hpp" -#include "nativeInst_zero.hpp" -#include "runtime/sharedRuntime.hpp" diff --git a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp index 6c245f8f1a6..28b47877264 100644 --- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp +++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp @@ -359,11 +359,6 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info, stub = SharedRuntime::continuation_for_implicit_exception( thread, pc, SharedRuntime::IMPLICIT_NULL); } - } else if (sig == SIGILL && - *(int*)pc == - NativeInstruction::not_entrant_illegal_instruction) { - // Not entrant - stub = SharedRuntime::get_handle_wrong_method_stub(); } } else if ((thread->thread_state() == _thread_in_vm || thread->thread_state() == _thread_in_native) && diff --git a/src/hotspot/share/gc/shared/barrierSetNMethod.cpp b/src/hotspot/share/gc/shared/barrierSetNMethod.cpp index 79d8a3f85b9..94d9de270ef 100644 --- a/src/hotspot/share/gc/shared/barrierSetNMethod.cpp +++ b/src/hotspot/share/gc/shared/barrierSetNMethod.cpp @@ -246,7 +246,10 @@ void BarrierSetNMethod::make_not_entrant(nmethod* nm) { // Enter critical section. Does not block for safepoint. ConditionalMutexLocker ml(NMethodEntryBarrier_lock, !NMethodEntryBarrier_lock->owned_by_self(), Mutex::_no_safepoint_check_flag); int value = guard_value(nm) | not_entrant; - set_guard_value(nm, value); + if (guard_value(nm) != value) { + // Patch the code only if needed. + set_guard_value(nm, value); + } } bool BarrierSetNMethod::is_not_entrant(nmethod* nm) {