8224203: Remove need to specify type when using FLAG_SET macros

Reviewed-by: rehn, pliden, coleenp
This commit is contained in:
Stefan Karlsson 2019-05-22 13:06:31 +02:00
parent c9846fce19
commit 4914e0ee95
26 changed files with 277 additions and 238 deletions

View file

@ -1634,7 +1634,7 @@ void Arguments::set_use_compressed_oops() {
if (max_heap_size <= max_heap_for_compressed_oops()) {
#if !defined(COMPILER1) || defined(TIERED)
if (FLAG_IS_DEFAULT(UseCompressedOops)) {
FLAG_SET_ERGO(bool, UseCompressedOops, true);
FLAG_SET_ERGO(UseCompressedOops, true);
}
#endif
} else {
@ -1663,7 +1663,7 @@ void Arguments::set_use_compressed_klass_ptrs() {
} else {
// Turn on UseCompressedClassPointers too
if (FLAG_IS_DEFAULT(UseCompressedClassPointers)) {
FLAG_SET_ERGO(bool, UseCompressedClassPointers, true);
FLAG_SET_ERGO(UseCompressedClassPointers, true);
}
// Check the CompressedClassSpaceSize to make sure we use compressed klass ptrs.
if (UseCompressedClassPointers) {
@ -1771,7 +1771,7 @@ void Arguments::set_heap_size() {
DefaultHeapBaseMinAddress,
DefaultHeapBaseMinAddress/G,
HeapBaseMinAddress);
FLAG_SET_ERGO(size_t, HeapBaseMinAddress, DefaultHeapBaseMinAddress);
FLAG_SET_ERGO(HeapBaseMinAddress, DefaultHeapBaseMinAddress);
}
}
@ -1793,7 +1793,7 @@ void Arguments::set_heap_size() {
}
log_trace(gc, heap)(" Maximum heap size " SIZE_FORMAT, (size_t) reasonable_max);
FLAG_SET_ERGO(size_t, MaxHeapSize, (size_t)reasonable_max);
FLAG_SET_ERGO(MaxHeapSize, (size_t)reasonable_max);
}
// If the minimum or initial heap_size have not been set or requested to be set
@ -1814,7 +1814,7 @@ void Arguments::set_heap_size() {
reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
log_trace(gc, heap)(" Initial heap size " SIZE_FORMAT, (size_t)reasonable_initial);
FLAG_SET_ERGO(size_t, InitialHeapSize, (size_t)reasonable_initial);
FLAG_SET_ERGO(InitialHeapSize, (size_t)reasonable_initial);
}
// If the minimum heap size has not been set (via -Xms),
// synchronize with InitialHeapSize to avoid errors with the default value.
@ -1855,10 +1855,10 @@ jint Arguments::set_aggressive_heap_flags() {
initHeapSize = limit_by_allocatable_memory(initHeapSize);
if (FLAG_IS_DEFAULT(MaxHeapSize)) {
if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, initHeapSize) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxHeapSize, initHeapSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, initHeapSize) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(InitialHeapSize, initHeapSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// Currently the minimum size and the initial heap sizes are the same.
@ -1866,11 +1866,11 @@ jint Arguments::set_aggressive_heap_flags() {
}
if (FLAG_IS_DEFAULT(NewSize)) {
// Make the young generation 3/8ths of the total heap.
if (FLAG_SET_CMDLINE(size_t, NewSize,
if (FLAG_SET_CMDLINE(NewSize,
((julong) MaxHeapSize / (julong) 8) * (julong) 3) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, MaxNewSize, NewSize) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxNewSize, NewSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
}
@ -1880,20 +1880,20 @@ jint Arguments::set_aggressive_heap_flags() {
#endif
// Increase some data structure sizes for efficiency
if (FLAG_SET_CMDLINE(size_t, BaseFootPrintEstimate, MaxHeapSize) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BaseFootPrintEstimate, MaxHeapSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, ResizeTLAB, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ResizeTLAB, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, TLABSize, 256 * K) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(TLABSize, 256 * K) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// See the OldPLABSize comment below, but replace 'after promotion'
// with 'after copying'. YoungPLABSize is the size of the survivor
// space per-gc-thread buffers. The default is 4kw.
if (FLAG_SET_CMDLINE(size_t, YoungPLABSize, 256 * K) != JVMFlag::SUCCESS) { // Note: this is in words
if (FLAG_SET_CMDLINE(YoungPLABSize, 256 * K) != JVMFlag::SUCCESS) { // Note: this is in words
return JNI_EINVAL;
}
@ -1910,29 +1910,29 @@ jint Arguments::set_aggressive_heap_flags() {
// locality. A minor effect may be that larger PLABs reduce the
// number of PLAB allocation events during gc. The value of 8kw
// was arrived at by experimenting with specjbb.
if (FLAG_SET_CMDLINE(size_t, OldPLABSize, 8 * K) != JVMFlag::SUCCESS) { // Note: this is in words
if (FLAG_SET_CMDLINE(OldPLABSize, 8 * K) != JVMFlag::SUCCESS) { // Note: this is in words
return JNI_EINVAL;
}
// Enable parallel GC and adaptive generation sizing
if (FLAG_SET_CMDLINE(bool, UseParallelGC, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseParallelGC, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// Encourage steady state memory management
if (FLAG_SET_CMDLINE(uintx, ThresholdTolerance, 100) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ThresholdTolerance, 100) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// This appears to improve mutator locality
if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// Get around early Solaris scheduling bug
// (affinity vs other jobs on system)
// but disallow DR and offlining (5008695).
if (FLAG_SET_CMDLINE(bool, BindGCTaskThreadsToCPUs, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BindGCTaskThreadsToCPUs, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
@ -2053,7 +2053,7 @@ bool Arguments::check_vm_args_consistency() {
#ifndef SUPPORT_RESERVED_STACK_AREA
if (StackReservedPages != 0) {
FLAG_SET_CMDLINE(intx, StackReservedPages, 0);
FLAG_SET_CMDLINE(StackReservedPages, 0);
warning("Reserved Stack Area not supported on this platform");
}
#endif
@ -2372,7 +2372,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
} else if (!strcmp(tail, ":gc")) {
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc));
} else if (!strcmp(tail, ":jni")) {
if (FLAG_SET_CMDLINE(bool, PrintJNIResolving, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(PrintJNIResolving, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
}
@ -2515,24 +2515,24 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
set_enable_preview();
// -Xnoclassgc
} else if (match_option(option, "-Xnoclassgc")) {
if (FLAG_SET_CMDLINE(bool, ClassUnloading, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ClassUnloading, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xconcgc
} else if (match_option(option, "-Xconcgc")) {
if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseConcMarkSweepGC, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
handle_extra_cms_flags("-Xconcgc uses UseConcMarkSweepGC");
// -Xnoconcgc
} else if (match_option(option, "-Xnoconcgc")) {
if (FLAG_SET_CMDLINE(bool, UseConcMarkSweepGC, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseConcMarkSweepGC, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
handle_extra_cms_flags("-Xnoconcgc uses UseConcMarkSweepGC");
// -Xbatch
} else if (match_option(option, "-Xbatch")) {
if (FLAG_SET_CMDLINE(bool, BackgroundCompilation, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BackgroundCompilation, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xmn for compatibility with other JVM vendors
@ -2545,10 +2545,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
describe_range_error(errcode);
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, MaxNewSize, (size_t)long_initial_young_size) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxNewSize, (size_t)long_initial_young_size) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, NewSize, (size_t)long_initial_young_size) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(NewSize, (size_t)long_initial_young_size) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xms
@ -2565,7 +2565,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
MinHeapSize = (size_t)long_initial_heap_size;
// Currently the minimum size and the initial heap sizes are the same.
// Can be overridden with -XX:InitialHeapSize.
if (FLAG_SET_CMDLINE(size_t, InitialHeapSize, (size_t)long_initial_heap_size) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(InitialHeapSize, (size_t)long_initial_heap_size) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xmx
@ -2578,7 +2578,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
describe_range_error(errcode);
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(size_t, MaxHeapSize, (size_t)long_max_heap_size) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxHeapSize, (size_t)long_max_heap_size) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// Xmaxf
@ -2591,7 +2591,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
option->optionString);
return JNI_EINVAL;
} else {
if (FLAG_SET_CMDLINE(uintx, MaxHeapFreeRatio, maxf) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxHeapFreeRatio, maxf) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
}
@ -2605,7 +2605,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
option->optionString);
return JNI_EINVAL;
} else {
if (FLAG_SET_CMDLINE(uintx, MinHeapFreeRatio, minf) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MinHeapFreeRatio, minf) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
}
@ -2616,7 +2616,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
if (err != JNI_OK) {
return err;
}
if (FLAG_SET_CMDLINE(intx, ThreadStackSize, value) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ThreadStackSize, value) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-Xmaxjitcodesize", &tail) ||
@ -2629,7 +2629,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
"Invalid maximum code cache size: %s.\n", option->optionString);
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(uintx, ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ReservedCodeCacheSize, (uintx)long_ReservedCodeCacheSize) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -green
@ -2643,7 +2643,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
// -Xrs
} else if (match_option(option, "-Xrs")) {
// Classic/EVM option, new functionality
if (FLAG_SET_CMDLINE(bool, ReduceSignalUsage, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ReduceSignalUsage, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xprof
@ -2695,7 +2695,7 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
// Out of the box management support
if (match_option(option, "-Dcom.sun.management", &tail)) {
#if INCLUDE_MANAGEMENT
if (FLAG_SET_CMDLINE(bool, ManagementServer, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ManagementServer, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// management agent in module jdk.management.agent
@ -2720,54 +2720,54 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
set_mode_flags(_comp);
// -Xshare:dump
} else if (match_option(option, "-Xshare:dump")) {
if (FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DumpSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xshare:on
} else if (match_option(option, "-Xshare:on")) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(RequireSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
} else if (match_option(option, "-Xshare:auto")) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(RequireSharedSpaces, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xshare:off
} else if (match_option(option, "-Xshare:off")) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseSharedSpaces, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(RequireSharedSpaces, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// -Xverify
} else if (match_option(option, "-Xverify", &tail)) {
if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (strcmp(tail, ":remote") == 0) {
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (strcmp(tail, ":none") == 0) {
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, BytecodeVerificationRemote, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(BytecodeVerificationRemote, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
warning("Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.");
@ -2827,23 +2827,23 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
// Need to keep consistency of MaxTenuringThreshold and AlwaysTenure/NeverTenure;
// and the last option wins.
} else if (match_option(option, "-XX:+NeverTenure")) {
if (FLAG_SET_CMDLINE(bool, NeverTenure, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(NeverTenure, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, AlwaysTenure, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(AlwaysTenure, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, markOopDesc::max_age + 1) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxTenuringThreshold, markOopDesc::max_age + 1) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+AlwaysTenure")) {
if (FLAG_SET_CMDLINE(bool, NeverTenure, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(NeverTenure, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, AlwaysTenure, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(AlwaysTenure, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, 0) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxTenuringThreshold, 0) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:MaxTenuringThreshold=", &tail)) {
@ -2854,65 +2854,65 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, max_tenuring_thresh) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(MaxTenuringThreshold, max_tenuring_thresh) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (MaxTenuringThreshold == 0) {
if (FLAG_SET_CMDLINE(bool, NeverTenure, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(NeverTenure, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, AlwaysTenure, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(AlwaysTenure, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else {
if (FLAG_SET_CMDLINE(bool, NeverTenure, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(NeverTenure, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, AlwaysTenure, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(AlwaysTenure, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
}
} else if (match_option(option, "-XX:+DisplayVMOutputToStderr")) {
if (FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DisplayVMOutputToStdout, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DisplayVMOutputToStderr, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+DisplayVMOutputToStdout")) {
if (FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DisplayVMOutputToStderr, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DisplayVMOutputToStdout, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+ErrorFileToStderr")) {
if (FLAG_SET_CMDLINE(bool, ErrorFileToStdout, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ErrorFileToStdout, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, ErrorFileToStderr, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ErrorFileToStderr, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+ErrorFileToStdout")) {
if (FLAG_SET_CMDLINE(bool, ErrorFileToStderr, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ErrorFileToStderr, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, ErrorFileToStdout, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ErrorFileToStdout, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
} else if (match_option(option, "-XX:+ExtendedDTraceProbes")) {
#if defined(DTRACE_ENABLED)
if (FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ExtendedDTraceProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DTraceMethodProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DTraceAllocProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DTraceMonitorProbes, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
#else // defined(DTRACE_ENABLED)
@ -2922,11 +2922,11 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
#endif // defined(DTRACE_ENABLED)
#ifdef ASSERT
} else if (match_option(option, "-XX:+FullGCALot")) {
if (FLAG_SET_CMDLINE(bool, FullGCALot, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(FullGCALot, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
// disable scavenge before parallel mark-compact
if (FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
#endif
@ -2959,10 +2959,10 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m
// -Xshare:on
// -Xlog:class+path=info
if (PrintSharedArchiveAndExit) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(UseSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(RequireSharedSpaces, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
}
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, path));
@ -3087,7 +3087,7 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
// eventually fix up InitialTenuringThreshold if only MaxTenuringThreshold is set
if (FLAG_IS_DEFAULT(InitialTenuringThreshold) && (InitialTenuringThreshold > MaxTenuringThreshold)) {
FLAG_SET_ERGO(uintx, InitialTenuringThreshold, MaxTenuringThreshold);
FLAG_SET_ERGO(InitialTenuringThreshold, MaxTenuringThreshold);
}
#if !COMPILER2_OR_JVMCI
@ -3514,7 +3514,7 @@ bool Arguments::init_shared_archive_paths() {
if (DumpSharedSpaces) {
vm_exit_during_initialization("-XX:ArchiveClassesAtExit cannot be used with -Xshare:dump");
}
if (FLAG_SET_CMDLINE(bool, DynamicDumpSharedSpaces, true) != JVMFlag::SUCCESS) {
if (FLAG_SET_CMDLINE(DynamicDumpSharedSpaces, true) != JVMFlag::SUCCESS) {
return false;
}
check_unsupported_dumping_properties();
@ -4067,7 +4067,7 @@ jint Arguments::apply_ergo() {
#if defined(IA32)
// Only server compiler can optimize safepoints well enough.
if (!is_server_compilation_mode_vm()) {
FLAG_SET_ERGO_IF_DEFAULT(bool, ThreadLocalHandshakes, false);
FLAG_SET_ERGO_IF_DEFAULT(ThreadLocalHandshakes, false);
}
#endif
@ -4084,7 +4084,7 @@ jint Arguments::apply_ergo() {
jint Arguments::adjust_after_os() {
if (UseNUMA) {
if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
FLAG_SET_ERGO(bool, UseNUMA, false);
FLAG_SET_ERGO(UseNUMA, false);
} else if (UseParallelGC || UseParallelOldGC) {
if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
@ -4099,7 +4099,7 @@ jint Arguments::adjust_after_os() {
// all platforms and ParallelGC on Windows will interleave all
// of the heap spaces across NUMA nodes.
if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
FLAG_SET_ERGO(UseNUMAInterleaving, true);
}
}
return JNI_OK;