8340576: Some JVMCI flags are inconsistent

Reviewed-by: never
This commit is contained in:
Doug Simon 2024-09-26 19:36:26 +00:00
parent 1447967f53
commit 5d062e248e
9 changed files with 14 additions and 16 deletions

View File

@ -2234,7 +2234,7 @@ void SharedRuntime::generate_deopt_blob() {
int reexecute_offset = __ pc() - start;
#if INCLUDE_JVMCI && !defined(COMPILER1)
if (EnableJVMCI && UseJVMCICompiler) {
if (UseJVMCICompiler) {
// JVMCI does not use this kind of deoptimization
__ should_not_reach_here();
}

View File

@ -2110,7 +2110,7 @@ void SharedRuntime::generate_deopt_blob() {
int reexecute_offset = __ pc() - start;
#if INCLUDE_JVMCI && !defined(COMPILER1)
if (EnableJVMCI && UseJVMCICompiler) {
if (UseJVMCICompiler) {
// JVMCI does not use this kind of deoptimization
__ should_not_reach_here();
}

View File

@ -2674,7 +2674,7 @@ void SharedRuntime::generate_deopt_blob() {
int reexecute_offset = __ pc() - start;
#if INCLUDE_JVMCI && !defined(COMPILER1)
if (EnableJVMCI && UseJVMCICompiler) {
if (UseJVMCICompiler) {
// JVMCI does not use this kind of deoptimization
__ should_not_reach_here();
}

View File

@ -66,12 +66,10 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
continue;
#ifndef COMPILER2
COMPILER1_PRESENT(ShouldNotReachHere();)
#if INCLUDE_JVMCI
if (UseJVMCICompiler) {
ShouldNotReachHere();
}
if (!EnableJVMCI)
#endif
ShouldNotReachHere();
#endif // !COMPILER2
address loc = fr->oopmapreg_to_location(omv.reg(), reg_map);

View File

@ -26,6 +26,7 @@
#include "compiler/compilerDefinitions.hpp"
#include "gc/shared/gcConfig.hpp"
#include "jvm.h"
#include "jvmci/jvmci.hpp"
#include "jvmci/jvmci_globals.hpp"
#include "logging/log.hpp"
#include "runtime/arguments.hpp"
@ -90,8 +91,7 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
if (EnableJVMCI) {
if (FLAG_IS_DEFAULT(UseJVMCINativeLibrary) && !UseJVMCINativeLibrary) {
char path[JVM_MAXPATHLEN];
if (os::dll_locate_lib(path, sizeof(path), Arguments::get_dll_dir(), JVMCI_SHARED_LIBRARY_NAME)) {
if (JVMCI::shared_library_exists()) {
// If a JVMCI native library is present,
// we enable UseJVMCINativeLibrary by default.
FLAG_SET_DEFAULT(UseJVMCINativeLibrary, true);

View File

@ -45,7 +45,7 @@ class fileStream;
constraint) \
\
product(bool, EnableJVMCI, false, EXPERIMENTAL, \
"Enable JVMCI") \
"Enable JVMCI. Defaults to true if UseJVMCICompiler is true.") \
\
product(bool, UseGraalJIT, false, EXPERIMENTAL, \
"Select the Graal JVMCI compiler. This is an alias for: " \
@ -140,8 +140,8 @@ class fileStream;
product(bool, UseJVMCINativeLibrary, false, EXPERIMENTAL, \
"Execute JVMCI Java code from a shared library (\"libjvmci\") " \
"instead of loading it from class files and executing it " \
"on the HotSpot heap. Defaults to true if EnableJVMCI is " \
"true and a JVMCI native library is available.") \
"on the HotSpot heap. Defaults to true if UseJVMCICompiler or " \
"EnableJVMCI is true and a JVMCI native library is available.") \
\
product(double, JVMCINativeLibraryThreadFraction, 0.33, EXPERIMENTAL, \
"The fraction of compiler threads used by libjvmci. " \

View File

@ -447,7 +447,7 @@ bool Deoptimization::deoptimize_objects_internal(JavaThread* thread, GrowableArr
RegisterMap map(chunk->at(0)->register_map());
bool deoptimized_objects = false;
bool const jvmci_enabled = JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false);
bool const jvmci_enabled = JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false);
// Reallocate the non-escaping objects and restore their fields.
if (jvmci_enabled COMPILER2_PRESENT(|| (DoEscapeAnalysis && EliminateAllocations)

View File

@ -71,7 +71,7 @@ public:
// Revert ea based optimizations for given deoptee thread
EscapeBarrier(bool barrier_active, JavaThread* calling_thread, JavaThread* deoptee_thread)
: _calling_thread(calling_thread), _deoptee_thread(deoptee_thread),
_barrier_active(barrier_active && (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false)
_barrier_active(barrier_active && (JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false)
COMPILER2_PRESENT(|| DoEscapeAnalysis)))
{
if (_barrier_active) sync_and_suspend_one();
@ -80,7 +80,7 @@ public:
// Revert ea based optimizations for all java threads
EscapeBarrier(bool barrier_active, JavaThread* calling_thread)
: _calling_thread(calling_thread), _deoptee_thread(nullptr),
_barrier_active(barrier_active && (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false)
_barrier_active(barrier_active && (JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false)
COMPILER2_PRESENT(|| DoEscapeAnalysis)))
{
if (_barrier_active) sync_and_suspend_all();

View File

@ -651,7 +651,7 @@ void SharedRuntime::throw_and_post_jvmti_exception(JavaThread* current, Handle h
}
#if INCLUDE_JVMCI
if (EnableJVMCI && UseJVMCICompiler) {
if (EnableJVMCI) {
vframeStream vfst(current, true);
methodHandle method = methodHandle(current, vfst.method());
int bci = vfst.bci();