Skip to content

Commit 6a48a4e

Browse files
dougxcXiaohong Gong
authored andcommitted
8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
Co-authored-by: Xiaohong Gong <xiaohong.gong@arm.com> Reviewed-by: dlong, coleenp
1 parent 9d764ee commit 6a48a4e

File tree

6 files changed

+13
-32
lines changed

6 files changed

+13
-32
lines changed

src/hotspot/share/jvmci/jvmci.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ class JVMCI : public AllStatic {
6060
enum CodeInstallResult {
6161
ok,
6262
dependencies_failed,
63-
dependencies_invalid,
6463
cache_full,
6564
code_too_large
6665
};

src/hotspot/share/jvmci/jvmciRuntime.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,21 +1310,13 @@ JVMCI::CodeInstallResult JVMCIRuntime::validate_compile_task_dependencies(Depend
13101310
return JVMCI::dependencies_failed;
13111311
}
13121312

1313-
// Dependencies must be checked when the system dictionary changes
1314-
// or if we don't know whether it has changed (i.e., compile_state == NULL).
13151313
CompileTask* task = compile_state == NULL ? NULL : compile_state->task();
13161314
Dependencies::DepType result = dependencies->validate_dependencies(task, failure_detail);
13171315
if (result == Dependencies::end_marker) {
13181316
return JVMCI::ok;
13191317
}
13201318

1321-
if (!Dependencies::is_klass_type(result) || compile_state == NULL) {
1322-
return JVMCI::dependencies_failed;
1323-
}
1324-
// The dependencies were invalid at the time of installation
1325-
// without any intervening modification of the system
1326-
// dictionary. That means they were invalidly constructed.
1327-
return JVMCI::dependencies_invalid;
1319+
return JVMCI::dependencies_failed;
13281320
}
13291321

13301322
// Reports a pending exception and exits the VM.

src/hotspot/share/jvmci/vmStructs_jvmci.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,10 @@
544544
declare_constant(JumpData::taken_off_set) \
545545
declare_constant(JumpData::displacement_off_set) \
546546
\
547-
declare_preprocessor_constant("JVMCIEnv::ok", JVMCI::ok) \
548-
declare_preprocessor_constant("JVMCIEnv::dependencies_failed", JVMCI::dependencies_failed) \
549-
declare_preprocessor_constant("JVMCIEnv::dependencies_invalid", JVMCI::dependencies_invalid) \
550-
declare_preprocessor_constant("JVMCIEnv::cache_full", JVMCI::cache_full) \
551-
declare_preprocessor_constant("JVMCIEnv::code_too_large", JVMCI::code_too_large) \
547+
declare_preprocessor_constant("JVMCI::ok", JVMCI::ok) \
548+
declare_preprocessor_constant("JVMCI::dependencies_failed", JVMCI::dependencies_failed) \
549+
declare_preprocessor_constant("JVMCI::cache_full", JVMCI::cache_full) \
550+
declare_preprocessor_constant("JVMCI::code_too_large", JVMCI::code_too_large) \
552551
declare_constant(JVMCIRuntime::none) \
553552
declare_constant(JVMCIRuntime::by_holder) \
554553
declare_constant(JVMCIRuntime::by_full_signature) \

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,8 @@ public static CompilerToVM compilerToVM() {
372372
* @return the outcome of the installation which will be one of
373373
* {@link HotSpotVMConfig#codeInstallResultOk},
374374
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
375-
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
376-
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
377-
* {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
375+
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
376+
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
378377
* @throws JVMCIError if there is something wrong with the compiled code or the associated
379378
* metadata.
380379
*/
@@ -390,9 +389,8 @@ public static CompilerToVM compilerToVM() {
390389
* @return the outcome of the installation which will be one of
391390
* {@link HotSpotVMConfig#codeInstallResultOk},
392391
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
393-
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
394-
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
395-
* {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
392+
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
393+
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
396394
* @throws JVMCIError if there is something wrong with the compiled code or the metadata
397395
*/
398396
native int getMetadata(TargetDescription target, HotSpotCompiledCode compiledCode, HotSpotMetaData metaData);

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCodeCacheProvider.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ public InstalledCode installCode(ResolvedJavaMethod method, CompiledCode compile
144144
} else {
145145
msg = String.format("Code installation failed: %s", resultDesc);
146146
}
147-
if (result == config.codeInstallResultDependenciesInvalid) {
148-
throw new AssertionError(resultDesc + " " + msg);
149-
}
150147
throw new BailoutException(result != config.codeInstallResultDependenciesFailed, msg);
151148
} else {
152149
throw new BailoutException("Error installing %s: %s", ((HotSpotCompiledCode) compiledCode).getName(), resultDesc);

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,10 @@ final int baseVtableLength() {
351351
final int vmIntrinsicLinkToSpecial = getConstant("vmIntrinsics::_linkToSpecial", Integer.class);
352352
final int vmIntrinsicLinkToInterface = getConstant("vmIntrinsics::_linkToInterface", Integer.class);
353353

354-
final int codeInstallResultOk = getConstant("JVMCIEnv::ok", Integer.class);
355-
final int codeInstallResultDependenciesFailed = getConstant("JVMCIEnv::dependencies_failed", Integer.class);
356-
final int codeInstallResultDependenciesInvalid = getConstant("JVMCIEnv::dependencies_invalid", Integer.class);
357-
final int codeInstallResultCacheFull = getConstant("JVMCIEnv::cache_full", Integer.class);
358-
final int codeInstallResultCodeTooLarge = getConstant("JVMCIEnv::code_too_large", Integer.class);
354+
final int codeInstallResultOk = getConstant("JVMCI::ok", Integer.class);
355+
final int codeInstallResultDependenciesFailed = getConstant("JVMCI::dependencies_failed", Integer.class);
356+
final int codeInstallResultCacheFull = getConstant("JVMCI::cache_full", Integer.class);
357+
final int codeInstallResultCodeTooLarge = getConstant("JVMCI::code_too_large", Integer.class);
359358

360359
String getCodeInstallResultDescription(int codeInstallResult) {
361360
if (codeInstallResult == codeInstallResultOk) {
@@ -364,9 +363,6 @@ String getCodeInstallResultDescription(int codeInstallResult) {
364363
if (codeInstallResult == codeInstallResultDependenciesFailed) {
365364
return "dependencies failed";
366365
}
367-
if (codeInstallResult == codeInstallResultDependenciesInvalid) {
368-
return "dependencies invalid";
369-
}
370366
if (codeInstallResult == codeInstallResultCacheFull) {
371367
return "code cache is full";
372368
}

0 commit comments

Comments
 (0)