/* * Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved. * 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. *
*/
// Checks that a given flag is not set if a given guard flag is false. #define CHECK_NOT_SET(FLAG, GUARD) \
JVMCI_FLAG_CHECKED(FLAG) \ if (!GUARD && !FLAG_IS_DEFAULT(FLAG)) { \
jio_fprintf(defaultStream::error_stream(), \ "Improperly specified VM option '%s': '%s' must be enabled\n", #FLAG, #GUARD); \ returnfalse; \
}
if (EnableJVMCIProduct) { if (FLAG_IS_DEFAULT(EnableJVMCI)) {
FLAG_SET_DEFAULT(EnableJVMCI, true);
} if (EnableJVMCI && FLAG_IS_DEFAULT(UseJVMCICompiler)) {
FLAG_SET_DEFAULT(UseJVMCICompiler, true);
}
}
if (UseJVMCICompiler) { 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 a JVMCI native library is present, // we enable UseJVMCINativeLibrary by default.
FLAG_SET_DEFAULT(UseJVMCINativeLibrary, true);
}
} if (!FLAG_IS_DEFAULT(EnableJVMCI) && !EnableJVMCI) {
jio_fprintf(defaultStream::error_stream(), "Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n"); returnfalse;
}
FLAG_SET_DEFAULT(EnableJVMCI, true); if (BootstrapJVMCI && UseJVMCINativeLibrary) {
jio_fprintf(defaultStream::error_stream(), "-XX:+BootstrapJVMCI is not compatible with -XX:+UseJVMCINativeLibrary\n"); returnfalse;
} if (BootstrapJVMCI && (TieredStopAtLevel < CompLevel_full_optimization)) {
jio_fprintf(defaultStream::error_stream(), "-XX:+BootstrapJVMCI is not compatible with -XX:TieredStopAtLevel=%d\n", TieredStopAtLevel); returnfalse;
}
}
if (!EnableJVMCI) { // Switch off eager JVMCI initialization if JVMCI is disabled. // Don't throw error if EagerJVMCI is set to allow testing. if (EagerJVMCI) {
FLAG_SET_DEFAULT(EagerJVMCI, false);
}
}
JVMCI_FLAG_CHECKED(EagerJVMCI)
for (int i = 0; JVMCIFlags[i] != NULL; i++) {
JVMFlag *jvmciFlag = (JVMFlag *)JVMFlag::find_declared_flag(JVMCIFlags[i]); if (jvmciFlag == NULL) { returnfalse;
}
jvmciFlag->clear_experimental();
jvmciFlag->set_product();
}
bool value = true;
JVMFlag *jvmciEnableFlag = JVMFlag::find_flag("EnableJVMCIProduct"); if (JVMFlagAccess::set_bool(jvmciEnableFlag, &value, origin) != JVMFlag::SUCCESS) { returnfalse;
}
// Effect of EnableJVMCIProduct on changing defaults of EnableJVMCI // and UseJVMCICompiler is deferred to check_jvmci_flags_are_consistent // so that setting these flags explicitly (e.g. on the command line) // takes precedence.
void JVMCIGlobals::check_jvmci_supported_gc() { if (EnableJVMCI) { // Check if selected GC is supported by JVMCI and Java compiler if (!gc_supports_jvmci()) {
log_warning(gc, jvmci)("Setting EnableJVMCI to false as selected GC does not support JVMCI: %s", GCConfig::hs_err_name());
FLAG_SET_DEFAULT(EnableJVMCI, false);
FLAG_SET_DEFAULT(UseJVMCICompiler, false);
}
}
}
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.