Skip to content

Commit 5d062e2

Browse files
author
Doug Simon
committed
8340576: Some JVMCI flags are inconsistent
Reviewed-by: never
1 parent 1447967 commit 5d062e2

File tree

9 files changed

+14
-16
lines changed

9 files changed

+14
-16
lines changed

src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,7 @@ void SharedRuntime::generate_deopt_blob() {
22342234

22352235
int reexecute_offset = __ pc() - start;
22362236
#if INCLUDE_JVMCI && !defined(COMPILER1)
2237-
if (EnableJVMCI && UseJVMCICompiler) {
2237+
if (UseJVMCICompiler) {
22382238
// JVMCI does not use this kind of deoptimization
22392239
__ should_not_reach_here();
22402240
}

src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ void SharedRuntime::generate_deopt_blob() {
21102110

21112111
int reexecute_offset = __ pc() - start;
21122112
#if INCLUDE_JVMCI && !defined(COMPILER1)
2113-
if (EnableJVMCI && UseJVMCICompiler) {
2113+
if (UseJVMCICompiler) {
21142114
// JVMCI does not use this kind of deoptimization
21152115
__ should_not_reach_here();
21162116
}

src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2674,7 +2674,7 @@ void SharedRuntime::generate_deopt_blob() {
26742674

26752675
int reexecute_offset = __ pc() - start;
26762676
#if INCLUDE_JVMCI && !defined(COMPILER1)
2677-
if (EnableJVMCI && UseJVMCICompiler) {
2677+
if (UseJVMCICompiler) {
26782678
// JVMCI does not use this kind of deoptimization
26792679
__ should_not_reach_here();
26802680
}

src/hotspot/share/compiler/oopMap.inline.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,10 @@ void OopMapDo<OopFnT, DerivedOopFnT, ValueFilterT>::iterate_oops_do(const frame
6666
continue;
6767

6868
#ifndef COMPILER2
69-
COMPILER1_PRESENT(ShouldNotReachHere();)
7069
#if INCLUDE_JVMCI
71-
if (UseJVMCICompiler) {
72-
ShouldNotReachHere();
73-
}
70+
if (!EnableJVMCI)
7471
#endif
72+
ShouldNotReachHere();
7573
#endif // !COMPILER2
7674

7775
address loc = fr->oopmapreg_to_location(omv.reg(), reg_map);

src/hotspot/share/jvmci/jvmci_globals.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "compiler/compilerDefinitions.hpp"
2727
#include "gc/shared/gcConfig.hpp"
2828
#include "jvm.h"
29+
#include "jvmci/jvmci.hpp"
2930
#include "jvmci/jvmci_globals.hpp"
3031
#include "logging/log.hpp"
3132
#include "runtime/arguments.hpp"
@@ -90,8 +91,7 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
9091

9192
if (EnableJVMCI) {
9293
if (FLAG_IS_DEFAULT(UseJVMCINativeLibrary) && !UseJVMCINativeLibrary) {
93-
char path[JVM_MAXPATHLEN];
94-
if (os::dll_locate_lib(path, sizeof(path), Arguments::get_dll_dir(), JVMCI_SHARED_LIBRARY_NAME)) {
94+
if (JVMCI::shared_library_exists()) {
9595
// If a JVMCI native library is present,
9696
// we enable UseJVMCINativeLibrary by default.
9797
FLAG_SET_DEFAULT(UseJVMCINativeLibrary, true);

src/hotspot/share/jvmci/jvmci_globals.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class fileStream;
4545
constraint) \
4646
\
4747
product(bool, EnableJVMCI, false, EXPERIMENTAL, \
48-
"Enable JVMCI") \
48+
"Enable JVMCI. Defaults to true if UseJVMCICompiler is true.") \
4949
\
5050
product(bool, UseGraalJIT, false, EXPERIMENTAL, \
5151
"Select the Graal JVMCI compiler. This is an alias for: " \
@@ -140,8 +140,8 @@ class fileStream;
140140
product(bool, UseJVMCINativeLibrary, false, EXPERIMENTAL, \
141141
"Execute JVMCI Java code from a shared library (\"libjvmci\") " \
142142
"instead of loading it from class files and executing it " \
143-
"on the HotSpot heap. Defaults to true if EnableJVMCI is " \
144-
"true and a JVMCI native library is available.") \
143+
"on the HotSpot heap. Defaults to true if UseJVMCICompiler or " \
144+
"EnableJVMCI is true and a JVMCI native library is available.") \
145145
\
146146
product(double, JVMCINativeLibraryThreadFraction, 0.33, EXPERIMENTAL, \
147147
"The fraction of compiler threads used by libjvmci. " \

src/hotspot/share/runtime/deoptimization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ bool Deoptimization::deoptimize_objects_internal(JavaThread* thread, GrowableArr
447447
RegisterMap map(chunk->at(0)->register_map());
448448
bool deoptimized_objects = false;
449449

450-
bool const jvmci_enabled = JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false);
450+
bool const jvmci_enabled = JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false);
451451

452452
// Reallocate the non-escaping objects and restore their fields.
453453
if (jvmci_enabled COMPILER2_PRESENT(|| (DoEscapeAnalysis && EliminateAllocations)

src/hotspot/share/runtime/escapeBarrier.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class EscapeBarrier : StackObj {
7171
// Revert ea based optimizations for given deoptee thread
7272
EscapeBarrier(bool barrier_active, JavaThread* calling_thread, JavaThread* deoptee_thread)
7373
: _calling_thread(calling_thread), _deoptee_thread(deoptee_thread),
74-
_barrier_active(barrier_active && (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false)
74+
_barrier_active(barrier_active && (JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false)
7575
COMPILER2_PRESENT(|| DoEscapeAnalysis)))
7676
{
7777
if (_barrier_active) sync_and_suspend_one();
@@ -80,7 +80,7 @@ class EscapeBarrier : StackObj {
8080
// Revert ea based optimizations for all java threads
8181
EscapeBarrier(bool barrier_active, JavaThread* calling_thread)
8282
: _calling_thread(calling_thread), _deoptee_thread(nullptr),
83-
_barrier_active(barrier_active && (JVMCI_ONLY(UseJVMCICompiler) NOT_JVMCI(false)
83+
_barrier_active(barrier_active && (JVMCI_ONLY(EnableJVMCI) NOT_JVMCI(false)
8484
COMPILER2_PRESENT(|| DoEscapeAnalysis)))
8585
{
8686
if (_barrier_active) sync_and_suspend_all();

src/hotspot/share/runtime/sharedRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ void SharedRuntime::throw_and_post_jvmti_exception(JavaThread* current, Handle h
651651
}
652652

653653
#if INCLUDE_JVMCI
654-
if (EnableJVMCI && UseJVMCICompiler) {
654+
if (EnableJVMCI) {
655655
vframeStream vfst(current, true);
656656
methodHandle method = methodHandle(current, vfst.method());
657657
int bci = vfst.bci();

0 commit comments

Comments
 (0)