mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
Merge
This commit is contained in:
commit
344a9becee
539 changed files with 51665 additions and 1091 deletions
|
@ -51,6 +51,9 @@
|
|||
#include "utilities/defaultStream.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/stringUtils.hpp"
|
||||
#if INCLUDE_JVMCI
|
||||
#include "jvmci/jvmciRuntime.hpp"
|
||||
#endif
|
||||
#if INCLUDE_ALL_GCS
|
||||
#include "gc/cms/compactibleFreeListSpace.hpp"
|
||||
#include "gc/g1/g1CollectedHeap.inline.hpp"
|
||||
|
@ -214,6 +217,8 @@ void Arguments::init_system_properties() {
|
|||
|
||||
// Set OS specific system properties values
|
||||
os::init_system_properties_values();
|
||||
|
||||
JVMCI_ONLY(JVMCIRuntime::init_system_properties(&_system_properties);)
|
||||
}
|
||||
|
||||
// Update/Initialize System properties after JDK version number is known
|
||||
|
@ -1377,7 +1382,7 @@ void Arguments::set_mode_flags(Mode mode) {
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(COMPILER2) || defined(_LP64) || !INCLUDE_CDS
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI || defined(_LP64) || !INCLUDE_CDS
|
||||
// Conflict: required to use shared spaces (-Xshare:on), but
|
||||
// incompatible command line options were chosen.
|
||||
|
||||
|
@ -1837,7 +1842,7 @@ void Arguments::select_gc() {
|
|||
void Arguments::set_ergonomics_flags() {
|
||||
select_gc();
|
||||
|
||||
#ifdef COMPILER2
|
||||
#if defined(COMPILER2) || INCLUDE_JVMCI
|
||||
// Shared spaces work fine with other GCs but causes bytecode rewriting
|
||||
// to be disabled, which hurts interpreter performance and decreases
|
||||
// server performance. When -server is specified, keep the default off
|
||||
|
@ -1921,7 +1926,7 @@ void Arguments::set_parallel_gc_flags() {
|
|||
|
||||
void Arguments::set_g1_gc_flags() {
|
||||
assert(UseG1GC, "Error");
|
||||
#ifdef COMPILER1
|
||||
#if defined(COMPILER1) || INCLUDE_JVMCI
|
||||
FastTLABRefill = false;
|
||||
#endif
|
||||
FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
|
||||
|
@ -2498,6 +2503,22 @@ bool Arguments::check_vm_args_consistency() {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#if INCLUDE_JVMCI
|
||||
if (EnableJVMCI) {
|
||||
if (!ScavengeRootsInCode) {
|
||||
warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
|
||||
ScavengeRootsInCode = 1;
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
|
||||
TypeProfileLevel = 0;
|
||||
}
|
||||
if (UseJVMCICompiler) {
|
||||
if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
|
||||
TypeProfileWidth = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Check lower bounds of the code cache
|
||||
// Template Interpreter code is approximately 3X larger in debug builds.
|
||||
|
@ -3486,6 +3507,37 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
|||
const char* fileSep = os::file_separator();
|
||||
sprintf(path, "%s%slib%sendorsed", Arguments::get_java_home(), fileSep, fileSep);
|
||||
|
||||
#if INCLUDE_JVMCI
|
||||
jint res = JVMCIRuntime::save_options(_system_properties);
|
||||
if (res != JNI_OK) {
|
||||
return res;
|
||||
}
|
||||
|
||||
if (EnableJVMCI) {
|
||||
// Append lib/jvmci/*.jar to boot class path
|
||||
char jvmciDir[JVM_MAXPATHLEN];
|
||||
const char* fileSep = os::file_separator();
|
||||
jio_snprintf(jvmciDir, sizeof(jvmciDir), "%s%slib%sjvmci", Arguments::get_java_home(), fileSep, fileSep);
|
||||
DIR* dir = os::opendir(jvmciDir);
|
||||
if (dir != NULL) {
|
||||
struct dirent *entry;
|
||||
char *dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(jvmciDir), mtInternal);
|
||||
while ((entry = os::readdir(dir, (dirent *) dbuf)) != NULL) {
|
||||
const char* name = entry->d_name;
|
||||
const char* ext = name + strlen(name) - 4;
|
||||
if (ext > name && strcmp(ext, ".jar") == 0) {
|
||||
char fileName[JVM_MAXPATHLEN];
|
||||
jio_snprintf(fileName, sizeof(fileName), "%s%s%s", jvmciDir, fileSep, name);
|
||||
scp_p->add_suffix(fileName);
|
||||
scp_assembly_required = true;
|
||||
}
|
||||
}
|
||||
FREE_C_HEAP_ARRAY(char, dbuf);
|
||||
os::closedir(dir);
|
||||
}
|
||||
}
|
||||
#endif // INCLUDE_JVMCI
|
||||
|
||||
if (CheckEndorsedAndExtDirs) {
|
||||
int nonEmptyDirs = 0;
|
||||
// check endorsed directory
|
||||
|
@ -3544,7 +3596,7 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
|||
FLAG_SET_ERGO(uintx, InitialTenuringThreshold, MaxTenuringThreshold);
|
||||
}
|
||||
|
||||
#ifndef COMPILER2
|
||||
#if !defined(COMPILER2) && !INCLUDE_JVMCI
|
||||
// Don't degrade server performance for footprint
|
||||
if (FLAG_IS_DEFAULT(UseLargePages) &&
|
||||
MaxHeapSize < LargePageHeapSizeThreshold) {
|
||||
|
@ -3554,7 +3606,7 @@ jint Arguments::finalize_vm_init_args(SysClassPath* scp_p, bool scp_assembly_req
|
|||
FLAG_SET_DEFAULT(UseLargePages, false);
|
||||
}
|
||||
|
||||
#else
|
||||
#elif defined(COMPILER2)
|
||||
if (!FLAG_IS_DEFAULT(OptoLoopAlignment) && FLAG_IS_DEFAULT(MaxLoopPad)) {
|
||||
FLAG_SET_DEFAULT(MaxLoopPad, OptoLoopAlignment-1);
|
||||
}
|
||||
|
@ -4307,6 +4359,9 @@ jint Arguments::apply_ergo() {
|
|||
#ifdef COMPILER1
|
||||
|| !UseFastLocking
|
||||
#endif // COMPILER1
|
||||
#if INCLUDE_JVMCI
|
||||
|| !JVMCIUseFastLocking
|
||||
#endif
|
||||
) {
|
||||
if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {
|
||||
// flag set to true on command line; warn the user that they
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue