--- a/src/hotspot/share/jvmci/jvmci_globals.cpp Wed May 01 12:41:26 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmci_globals.cpp Wed May 01 12:31:29 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -27,8 +27,11 @@
#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, \
@@ -79,6 +82,10 @@
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) {
@@ -97,7 +104,9 @@
CHECK_NOT_SET(JVMCINMethodSizeLimit, EnableJVMCI)
CHECK_NOT_SET(MethodProfileWidth, EnableJVMCI)
CHECK_NOT_SET(JVMCIPrintProperties, EnableJVMCI)
- CHECK_NOT_SET(TraceUncollectedSpeculations, 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");
@@ -110,10 +119,21 @@
#undef JVMCI_CHECK3
#undef JVMCI_CHECK4
#undef JVMCI_FLAG_CHECKED
-#endif
+#endif // PRODUCT
#undef CHECK_NOT_SET
+
+ if (JVMCILibDumpJNIConfig != NULL) {
+ _jni_config_file = new(ResourceObj::C_HEAP, mtJVMCI) 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