src/hotspot/share/jvmci/jvmci_globals.cpp
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File
open Cdiff src/hotspot/share/jvmci/jvmci_globals.cpp
src/hotspot/share/jvmci/jvmci_globals.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2018, 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.
--- 1,7 ----
/*
! * Copyright (c) 2000, 2019, 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.
*** 25,36 ****
--- 25,39 ----
#include "precompiled.hpp"
#include "jvm.h"
#include "jvmci/jvmci_globals.hpp"
#include "gc/shared/gcConfig.hpp"
#include "utilities/defaultStream.hpp"
+ #include "utilities/ostream.hpp"
#include "runtime/globals_extension.hpp"
+ fileStream* JVMCIGlobals::_jni_config_file = NULL;
+
JVMCI_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
MATERIALIZE_PD_DEVELOPER_FLAG, \
MATERIALIZE_PRODUCT_FLAG, \
MATERIALIZE_PD_PRODUCT_FLAG, \
MATERIALIZE_DIAGNOSTIC_FLAG, \
*** 77,105 ****
jio_fprintf(defaultStream::error_stream(),
"Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
return false;
}
FLAG_SET_DEFAULT(EnableJVMCI, true);
}
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)
CHECK_NOT_SET(JVMCITraceLevel, EnableJVMCI)
CHECK_NOT_SET(JVMCICounterSize, EnableJVMCI)
CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
CHECK_NOT_SET(JVMCIUseFastLocking, EnableJVMCI)
CHECK_NOT_SET(JVMCINMethodSizeLimit, EnableJVMCI)
CHECK_NOT_SET(MethodProfileWidth, EnableJVMCI)
CHECK_NOT_SET(JVMCIPrintProperties, EnableJVMCI)
! CHECK_NOT_SET(TraceUncollectedSpeculations, EnableJVMCI)
#ifndef PRODUCT
#define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
#define JVMCI_CHECK3(type, name, doc) assert(name##checked, #name " flag not checked");
// Ensures that all JVMCI flags are checked by this method.
--- 80,115 ----
jio_fprintf(defaultStream::error_stream(),
"Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled\n");
return false;
}
FLAG_SET_DEFAULT(EnableJVMCI, true);
+ if (BootstrapJVMCI && UseJVMCINativeLibrary) {
+ jio_fprintf(defaultStream::error_stream(), "-XX:+BootstrapJVMCI is not compatible with -XX:+UseJVMCINativeLibrary");
+ return false;
+ }
}
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(TraceClassLoadingCause)
JVMCI_FLAG_CHECKED(EagerJVMCI)
CHECK_NOT_SET(JVMCITraceLevel, EnableJVMCI)
CHECK_NOT_SET(JVMCICounterSize, EnableJVMCI)
CHECK_NOT_SET(JVMCICountersExcludeCompiler, EnableJVMCI)
CHECK_NOT_SET(JVMCIUseFastLocking, EnableJVMCI)
CHECK_NOT_SET(JVMCINMethodSizeLimit, EnableJVMCI)
CHECK_NOT_SET(MethodProfileWidth, EnableJVMCI)
CHECK_NOT_SET(JVMCIPrintProperties, EnableJVMCI)
! CHECK_NOT_SET(UseJVMCINativeLibrary, EnableJVMCI)
! CHECK_NOT_SET(JVMCILibPath, EnableJVMCI)
! CHECK_NOT_SET(JVMCILibDumpJNIConfig, EnableJVMCI)
#ifndef PRODUCT
#define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
#define JVMCI_CHECK3(type, name, doc) assert(name##checked, #name " flag not checked");
// Ensures that all JVMCI flags are checked by this method.
*** 108,121 ****
#undef JVMCI_DECLARE_CHECK3
#undef JVMCI_DECLARE_CHECK4
#undef JVMCI_CHECK3
#undef JVMCI_CHECK4
#undef JVMCI_FLAG_CHECKED
! #endif
#undef CHECK_NOT_SET
return true;
}
void JVMCIGlobals::check_jvmci_supported_gc() {
if (EnableJVMCI) {
// Check if selected GC is supported by JVMCI and Java compiler
if (!(UseSerialGC || UseParallelGC || UseParallelOldGC || UseG1GC)) {
vm_exit_during_initialization("JVMCI Compiler does not support selected GC", GCConfig::hs_err_name());
--- 118,142 ----
#undef JVMCI_DECLARE_CHECK3
#undef JVMCI_DECLARE_CHECK4
#undef JVMCI_CHECK3
#undef JVMCI_CHECK4
#undef JVMCI_FLAG_CHECKED
! #endif // PRODUCT
#undef CHECK_NOT_SET
+
+ if (JVMCILibDumpJNIConfig != NULL) {
+ _jni_config_file = new(ResourceObj::C_HEAP, mtInternal) fileStream(JVMCILibDumpJNIConfig);
+ if (_jni_config_file == NULL || !_jni_config_file->is_open()) {
+ jio_fprintf(defaultStream::error_stream(),
+ "Could not open file for dumping JVMCI shared library JNI config: %s\n", JVMCILibDumpJNIConfig);
+ return false;
+ }
+ }
+
return true;
}
+
void JVMCIGlobals::check_jvmci_supported_gc() {
if (EnableJVMCI) {
// Check if selected GC is supported by JVMCI and Java compiler
if (!(UseSerialGC || UseParallelGC || UseParallelOldGC || UseG1GC)) {
vm_exit_during_initialization("JVMCI Compiler does not support selected GC", GCConfig::hs_err_name());
src/hotspot/share/jvmci/jvmci_globals.cpp
Index
Unified diffs
Context diffs
Sdiffs
Frames
Patch
New
Old
Previous File
Next File