more TheRealMDoerr suggestions

This commit is contained in:
Dean Long 2025-06-12 12:45:59 -07:00
parent 88c1d72eda
commit 40b922977b
3 changed files with 4 additions and 36 deletions

View File

@ -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"

View File

@ -359,11 +359,6 @@ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
stub = SharedRuntime::continuation_for_implicit_exception( stub = SharedRuntime::continuation_for_implicit_exception(
thread, pc, SharedRuntime::IMPLICIT_NULL); 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 || } else if ((thread->thread_state() == _thread_in_vm ||
thread->thread_state() == _thread_in_native) && thread->thread_state() == _thread_in_native) &&

View File

@ -246,7 +246,10 @@ void BarrierSetNMethod::make_not_entrant(nmethod* nm) {
// Enter critical section. Does not block for safepoint. // Enter critical section. Does not block for safepoint.
ConditionalMutexLocker ml(NMethodEntryBarrier_lock, !NMethodEntryBarrier_lock->owned_by_self(), Mutex::_no_safepoint_check_flag); ConditionalMutexLocker ml(NMethodEntryBarrier_lock, !NMethodEntryBarrier_lock->owned_by_self(), Mutex::_no_safepoint_check_flag);
int value = guard_value(nm) | not_entrant; 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) { bool BarrierSetNMethod::is_not_entrant(nmethod* nm) {