mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 01:24:33 +02:00
Merge
This commit is contained in:
commit
b68bd82d9b
1246 changed files with 25722 additions and 41041 deletions
|
@ -410,23 +410,24 @@ static AliasedFlag const aliased_jvm_flags[] = {
|
|||
static AliasedLoggingFlag const aliased_logging_flags[] = {
|
||||
{ "PrintCompressedOopsMode", LogLevel::Info, true, LOG_TAGS(gc, heap, coops) },
|
||||
{ "TraceBiasedLocking", LogLevel::Info, true, LOG_TAGS(biasedlocking) },
|
||||
{ "TraceClassLoading", LogLevel::Info, true, LOG_TAGS(classload) },
|
||||
{ "TraceClassLoadingPreorder", LogLevel::Debug, true, LOG_TAGS(classload, preorder) },
|
||||
{ "TraceClassPaths", LogLevel::Info, true, LOG_TAGS(classpath) },
|
||||
{ "TraceClassResolution", LogLevel::Debug, true, LOG_TAGS(classresolve) },
|
||||
{ "TraceClassUnloading", LogLevel::Info, true, LOG_TAGS(classunload) },
|
||||
{ "TraceClassLoading", LogLevel::Info, true, LOG_TAGS(class, load) },
|
||||
{ "TraceClassLoadingPreorder", LogLevel::Debug, true, LOG_TAGS(class, preorder) },
|
||||
{ "TraceClassPaths", LogLevel::Info, true, LOG_TAGS(class, path) },
|
||||
{ "TraceClassResolution", LogLevel::Debug, true, LOG_TAGS(class, resolve) },
|
||||
{ "TraceClassUnloading", LogLevel::Info, true, LOG_TAGS(class, unload) },
|
||||
{ "TraceExceptions", LogLevel::Info, true, LOG_TAGS(exceptions) },
|
||||
{ "TraceLoaderConstraints", LogLevel::Info, true, LOG_TAGS(classload, constraints) },
|
||||
{ "TraceLoaderConstraints", LogLevel::Info, true, LOG_TAGS(class, loader, constraints) },
|
||||
{ "TraceMonitorInflation", LogLevel::Debug, true, LOG_TAGS(monitorinflation) },
|
||||
{ "TraceSafepointCleanupTime", LogLevel::Info, true, LOG_TAGS(safepointcleanup) },
|
||||
{ "TraceSafepointCleanupTime", LogLevel::Info, true, LOG_TAGS(safepoint, cleanup) },
|
||||
{ "TraceJVMTIObjectTagging", LogLevel::Debug, true, LOG_TAGS(jvmti, objecttagging) },
|
||||
{ NULL, LogLevel::Off, false, LOG_TAGS(_NO_TAG) }
|
||||
};
|
||||
|
||||
#ifndef PRODUCT
|
||||
// These options are removed in jdk9. Remove this code for jdk10.
|
||||
static AliasedFlag const removed_develop_logging_flags[] = {
|
||||
{ "TraceClassInitialization", "-Xlog:classinit" },
|
||||
{ "TraceClassLoaderData", "-Xlog:classloaderdata" },
|
||||
{ "TraceClassInitialization", "-Xlog:class+init" },
|
||||
{ "TraceClassLoaderData", "-Xlog:class+loader+data" },
|
||||
{ "TraceDefaultMethods", "-Xlog:defaultmethods=debug" },
|
||||
{ "TraceItables", "-Xlog:itables=debug" },
|
||||
{ "TraceMonitorMismatch", "-Xlog:monitormismatch=info" },
|
||||
|
@ -578,8 +579,8 @@ static bool verify_special_jvm_flags() {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Parses a memory size specification string.
|
||||
static bool atomull(const char *s, julong* result) {
|
||||
// Parses a size specification string.
|
||||
bool Arguments::atojulong(const char *s, julong* result) {
|
||||
julong n = 0;
|
||||
int args_read = 0;
|
||||
bool is_hex = false;
|
||||
|
@ -685,7 +686,7 @@ static bool set_numeric_flag(const char* name, char* value, Flag::Flags origin)
|
|||
return false;
|
||||
}
|
||||
|
||||
// Check the sign first since atomull() parses only unsigned values.
|
||||
// Check the sign first since atojulong() parses only unsigned values.
|
||||
if (*value == '-') {
|
||||
if (!result->is_intx() && !result->is_int()) {
|
||||
return false;
|
||||
|
@ -693,7 +694,7 @@ static bool set_numeric_flag(const char* name, char* value, Flag::Flags origin)
|
|||
value++;
|
||||
is_neg = true;
|
||||
}
|
||||
if (!atomull(value, &v)) {
|
||||
if (!Arguments::atojulong(value, &v)) {
|
||||
return false;
|
||||
}
|
||||
if (result->is_int()) {
|
||||
|
@ -799,7 +800,7 @@ void log_deprecated_flag(const char* name, bool on, AliasedLoggingFlag alf) {
|
|||
int max_tags = sizeof(tagSet)/sizeof(tagSet[0]);
|
||||
for (int i = 0; i < max_tags && tagSet[i] != LogTag::__NO_TAG; i++) {
|
||||
if (i > 0) {
|
||||
strncat(tagset_buffer, ",", max_tagset_len - strlen(tagset_buffer));
|
||||
strncat(tagset_buffer, "+", max_tagset_len - strlen(tagset_buffer));
|
||||
}
|
||||
strncat(tagset_buffer, LogTag::name(tagSet[i]), max_tagset_len - strlen(tagset_buffer));
|
||||
}
|
||||
|
@ -1916,6 +1917,28 @@ void Arguments::set_g1_gc_flags() {
|
|||
FLAG_SET_DEFAULT(GCTimeRatio, 12);
|
||||
}
|
||||
|
||||
// Below, we might need to calculate the pause time interval based on
|
||||
// the pause target. When we do so we are going to give G1 maximum
|
||||
// flexibility and allow it to do pauses when it needs to. So, we'll
|
||||
// arrange that the pause interval to be pause time target + 1 to
|
||||
// ensure that a) the pause time target is maximized with respect to
|
||||
// the pause interval and b) we maintain the invariant that pause
|
||||
// time target < pause interval. If the user does not want this
|
||||
// maximum flexibility, they will have to set the pause interval
|
||||
// explicitly.
|
||||
|
||||
if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
|
||||
// The default pause time target in G1 is 200ms
|
||||
FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
|
||||
}
|
||||
|
||||
// Then, if the interval parameter was not set, set it according to
|
||||
// the pause time target (this will also deal with the case when the
|
||||
// pause time target is the default value).
|
||||
if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
|
||||
FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
|
||||
}
|
||||
|
||||
log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
|
||||
log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
|
||||
}
|
||||
|
@ -2420,6 +2443,20 @@ bool Arguments::check_vm_args_consistency() {
|
|||
}
|
||||
FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
|
||||
}
|
||||
if (UseCompiler && is_interpreter_only()) {
|
||||
if (!FLAG_IS_DEFAULT(UseCompiler)) {
|
||||
warning("UseCompiler disabled due to -Xint.");
|
||||
}
|
||||
FLAG_SET_CMDLINE(bool, UseCompiler, false);
|
||||
}
|
||||
#ifdef COMPILER2
|
||||
if (PostLoopMultiversioning && !RangeCheckElimination) {
|
||||
if (!FLAG_IS_DEFAULT(PostLoopMultiversioning)) {
|
||||
warning("PostLoopMultiversioning disabled because RangeCheckElimination is disabled.");
|
||||
}
|
||||
FLAG_SET_CMDLINE(bool, PostLoopMultiversioning, false);
|
||||
}
|
||||
#endif
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2457,12 +2494,12 @@ bool Arguments::parse_uintx(const char* value,
|
|||
uintx* uintx_arg,
|
||||
uintx min_size) {
|
||||
|
||||
// Check the sign first since atomull() parses only unsigned values.
|
||||
// Check the sign first since atojulong() parses only unsigned values.
|
||||
bool value_is_positive = !(*value == '-');
|
||||
|
||||
if (value_is_positive) {
|
||||
julong n;
|
||||
bool good_return = atomull(value, &n);
|
||||
bool good_return = atojulong(value, &n);
|
||||
if (good_return) {
|
||||
bool above_minimum = n >= min_size;
|
||||
bool value_is_too_large = n > max_uintx;
|
||||
|
@ -2479,7 +2516,7 @@ bool Arguments::parse_uintx(const char* value,
|
|||
Arguments::ArgsRange Arguments::parse_memory_size(const char* s,
|
||||
julong* long_arg,
|
||||
julong min_size) {
|
||||
if (!atomull(s, long_arg)) return arg_unreadable;
|
||||
if (!atojulong(s, long_arg)) return arg_unreadable;
|
||||
return check_memory_size(*long_arg, min_size);
|
||||
}
|
||||
|
||||
|
@ -2602,8 +2639,8 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* xpatch_
|
|||
// -verbose:[class/gc/jni]
|
||||
if (match_option(option, "-verbose", &tail)) {
|
||||
if (!strcmp(tail, ":class") || !strcmp(tail, "")) {
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classload));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classunload));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, load));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, unload));
|
||||
} else if (!strcmp(tail, ":gc")) {
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc));
|
||||
} else if (!strcmp(tail, ":jni")) {
|
||||
|
@ -3236,7 +3273,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* xpatch_
|
|||
|
||||
// PrintSharedArchiveAndExit will turn on
|
||||
// -Xshare:on
|
||||
// -Xlog:classpath=info
|
||||
// -Xlog:class+path=info
|
||||
if (PrintSharedArchiveAndExit) {
|
||||
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != Flag::SUCCESS) {
|
||||
return JNI_EINVAL;
|
||||
|
@ -3244,7 +3281,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* xpatch_
|
|||
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true) != Flag::SUCCESS) {
|
||||
return JNI_EINVAL;
|
||||
}
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classpath));
|
||||
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, path));
|
||||
}
|
||||
|
||||
// Change the default value for flags which have different default values
|
||||
|
@ -4314,6 +4351,11 @@ jint Arguments::apply_ergo() {
|
|||
warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
|
||||
}
|
||||
|
||||
if (UseOnStackReplacement && !UseLoopCounter) {
|
||||
warning("On-stack-replacement requires loop counters; enabling loop counters");
|
||||
FLAG_SET_DEFAULT(UseLoopCounter, true);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
|
||||
if (use_vm_log()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue