8229797: [JVMCI] Clean up no longer used JVMCI::dependencies_invalid value
Co-authored-by: Xiaohong Gong <xiaohong.gong@arm.com> Reviewed-by: dlong, coleenp
This commit is contained in:
parent
9d764ee48e
commit
6a48a4e5ed
@ -60,7 +60,6 @@ class JVMCI : public AllStatic {
|
||||
enum CodeInstallResult {
|
||||
ok,
|
||||
dependencies_failed,
|
||||
dependencies_invalid,
|
||||
cache_full,
|
||||
code_too_large
|
||||
};
|
||||
|
@ -1310,21 +1310,13 @@ JVMCI::CodeInstallResult JVMCIRuntime::validate_compile_task_dependencies(Depend
|
||||
return JVMCI::dependencies_failed;
|
||||
}
|
||||
|
||||
// Dependencies must be checked when the system dictionary changes
|
||||
// or if we don't know whether it has changed (i.e., compile_state == NULL).
|
||||
CompileTask* task = compile_state == NULL ? NULL : compile_state->task();
|
||||
Dependencies::DepType result = dependencies->validate_dependencies(task, failure_detail);
|
||||
if (result == Dependencies::end_marker) {
|
||||
return JVMCI::ok;
|
||||
}
|
||||
|
||||
if (!Dependencies::is_klass_type(result) || compile_state == NULL) {
|
||||
return JVMCI::dependencies_failed;
|
||||
}
|
||||
// The dependencies were invalid at the time of installation
|
||||
// without any intervening modification of the system
|
||||
// dictionary. That means they were invalidly constructed.
|
||||
return JVMCI::dependencies_invalid;
|
||||
return JVMCI::dependencies_failed;
|
||||
}
|
||||
|
||||
// Reports a pending exception and exits the VM.
|
||||
|
@ -544,11 +544,10 @@
|
||||
declare_constant(JumpData::taken_off_set) \
|
||||
declare_constant(JumpData::displacement_off_set) \
|
||||
\
|
||||
declare_preprocessor_constant("JVMCIEnv::ok", JVMCI::ok) \
|
||||
declare_preprocessor_constant("JVMCIEnv::dependencies_failed", JVMCI::dependencies_failed) \
|
||||
declare_preprocessor_constant("JVMCIEnv::dependencies_invalid", JVMCI::dependencies_invalid) \
|
||||
declare_preprocessor_constant("JVMCIEnv::cache_full", JVMCI::cache_full) \
|
||||
declare_preprocessor_constant("JVMCIEnv::code_too_large", JVMCI::code_too_large) \
|
||||
declare_preprocessor_constant("JVMCI::ok", JVMCI::ok) \
|
||||
declare_preprocessor_constant("JVMCI::dependencies_failed", JVMCI::dependencies_failed) \
|
||||
declare_preprocessor_constant("JVMCI::cache_full", JVMCI::cache_full) \
|
||||
declare_preprocessor_constant("JVMCI::code_too_large", JVMCI::code_too_large) \
|
||||
declare_constant(JVMCIRuntime::none) \
|
||||
declare_constant(JVMCIRuntime::by_holder) \
|
||||
declare_constant(JVMCIRuntime::by_full_signature) \
|
||||
|
@ -372,9 +372,8 @@ final class CompilerToVM {
|
||||
* @return the outcome of the installation which will be one of
|
||||
* {@link HotSpotVMConfig#codeInstallResultOk},
|
||||
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
|
||||
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
|
||||
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
|
||||
* @throws JVMCIError if there is something wrong with the compiled code or the associated
|
||||
* metadata.
|
||||
*/
|
||||
@ -390,9 +389,8 @@ final class CompilerToVM {
|
||||
* @return the outcome of the installation which will be one of
|
||||
* {@link HotSpotVMConfig#codeInstallResultOk},
|
||||
* {@link HotSpotVMConfig#codeInstallResultCacheFull},
|
||||
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge},
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed} or
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesInvalid}.
|
||||
* {@link HotSpotVMConfig#codeInstallResultCodeTooLarge} or
|
||||
* {@link HotSpotVMConfig#codeInstallResultDependenciesFailed}.
|
||||
* @throws JVMCIError if there is something wrong with the compiled code or the metadata
|
||||
*/
|
||||
native int getMetadata(TargetDescription target, HotSpotCompiledCode compiledCode, HotSpotMetaData metaData);
|
||||
|
@ -144,9 +144,6 @@ public class HotSpotCodeCacheProvider implements CodeCacheProvider {
|
||||
} else {
|
||||
msg = String.format("Code installation failed: %s", resultDesc);
|
||||
}
|
||||
if (result == config.codeInstallResultDependenciesInvalid) {
|
||||
throw new AssertionError(resultDesc + " " + msg);
|
||||
}
|
||||
throw new BailoutException(result != config.codeInstallResultDependenciesFailed, msg);
|
||||
} else {
|
||||
throw new BailoutException("Error installing %s: %s", ((HotSpotCompiledCode) compiledCode).getName(), resultDesc);
|
||||
|
@ -351,11 +351,10 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess {
|
||||
final int vmIntrinsicLinkToSpecial = getConstant("vmIntrinsics::_linkToSpecial", Integer.class);
|
||||
final int vmIntrinsicLinkToInterface = getConstant("vmIntrinsics::_linkToInterface", Integer.class);
|
||||
|
||||
final int codeInstallResultOk = getConstant("JVMCIEnv::ok", Integer.class);
|
||||
final int codeInstallResultDependenciesFailed = getConstant("JVMCIEnv::dependencies_failed", Integer.class);
|
||||
final int codeInstallResultDependenciesInvalid = getConstant("JVMCIEnv::dependencies_invalid", Integer.class);
|
||||
final int codeInstallResultCacheFull = getConstant("JVMCIEnv::cache_full", Integer.class);
|
||||
final int codeInstallResultCodeTooLarge = getConstant("JVMCIEnv::code_too_large", Integer.class);
|
||||
final int codeInstallResultOk = getConstant("JVMCI::ok", Integer.class);
|
||||
final int codeInstallResultDependenciesFailed = getConstant("JVMCI::dependencies_failed", Integer.class);
|
||||
final int codeInstallResultCacheFull = getConstant("JVMCI::cache_full", Integer.class);
|
||||
final int codeInstallResultCodeTooLarge = getConstant("JVMCI::code_too_large", Integer.class);
|
||||
|
||||
String getCodeInstallResultDescription(int codeInstallResult) {
|
||||
if (codeInstallResult == codeInstallResultOk) {
|
||||
@ -364,9 +363,6 @@ class HotSpotVMConfig extends HotSpotVMConfigAccess {
|
||||
if (codeInstallResult == codeInstallResultDependenciesFailed) {
|
||||
return "dependencies failed";
|
||||
}
|
||||
if (codeInstallResult == codeInstallResultDependenciesInvalid) {
|
||||
return "dependencies invalid";
|
||||
}
|
||||
if (codeInstallResult == codeInstallResultCacheFull) {
|
||||
return "code cache is full";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user