--- old/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp 2018-05-23 14:52:06.000000000 -0500 +++ new/src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp 2018-05-23 14:52:05.000000000 -0500 @@ -31,14 +31,12 @@ #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" #include "runtime/flags/jvmFlagConstraintsCompiler.hpp" -#include "runtime/flags/jvmFlagRangeList.hpp" #include "runtime/globals.hpp" #include "runtime/globals_extension.hpp" -#include "utilities/defaultStream.hpp" JVMFlag::Error AliasLevelConstraintFunc(intx value, bool verbose) { if ((value <= 1) && (Arguments::mode() == Arguments::_comp || Arguments::mode() == Arguments::_mixed)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "AliasLevel (" INTX_FORMAT ") is not " "compatible with -Xcomp or -Xmixed\n", value); @@ -82,7 +80,7 @@ min_number_of_compiler_threads = MIN2(min_number_of_compiler_threads, CI_COMPILER_COUNT); if (value < (intx)min_number_of_compiler_threads) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CICompilerCount (" INTX_FORMAT ") must be " "at least %d \n", value, min_number_of_compiler_threads); @@ -94,7 +92,7 @@ JVMFlag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) { if (value < 0 || value > 512) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "AllocatePrefetchDistance (" INTX_FORMAT ") must be " "between 0 and " INTX_FORMAT "\n", AllocatePrefetchDistance, 512); @@ -107,7 +105,7 @@ JVMFlag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) { if (AllocatePrefetchStyle == 3) { if (value % wordSize != 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n", value, wordSize); return JVMFlag::VIOLATES_CONSTRAINT; @@ -124,7 +122,7 @@ max_value = 3; #endif if (value < 0 || value > max_value) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "AllocatePrefetchInstr (" INTX_FORMAT ") must be " "between 0 and " INTX_FORMAT "\n", value, max_value); return JVMFlag::VIOLATES_CONSTRAINT; @@ -135,7 +133,7 @@ JVMFlag::Error CompileThresholdConstraintFunc(intx value, bool verbose) { if (value < 0 || value > INT_MAX >> InvocationCounter::count_shift) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CompileThreshold (" INTX_FORMAT ") " "must be between 0 and %d\n", value, @@ -150,7 +148,7 @@ int backward_branch_limit; if (ProfileInterpreter) { if (OnStackReplacePercentage < InterpreterProfilePercentage) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n", OnStackReplacePercentage, InterpreterProfilePercentage); @@ -161,7 +159,7 @@ << InvocationCounter::count_shift; if (backward_branch_limit < 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = " INTX_FORMAT " " "must be between 0 and " INTX_FORMAT ", try changing " @@ -172,7 +170,7 @@ } } else { if (OnStackReplacePercentage < 0 ) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " "non-negative\n", OnStackReplacePercentage); return JVMFlag::VIOLATES_CONSTRAINT; @@ -182,7 +180,7 @@ << InvocationCounter::count_shift; if (backward_branch_limit < 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " " "must be between 0 and " INTX_FORMAT ", try changing " "CompileThreshold and/or OnStackReplacePercentage\n", @@ -196,7 +194,7 @@ JVMFlag::Error CodeCacheSegmentSizeConstraintFunc(uintx value, bool verbose) { if (CodeCacheSegmentSize < (uintx)CodeEntryAlignment) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeCacheSegmentSize (" UINTX_FORMAT ") must be " "larger than or equal to CodeEntryAlignment (" INTX_FORMAT ") " "to align entry points\n", @@ -205,7 +203,7 @@ } if (CodeCacheSegmentSize < sizeof(jdouble)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeCacheSegmentSize (" UINTX_FORMAT ") must be " "at least " SIZE_FORMAT " to align constants\n", CodeCacheSegmentSize, sizeof(jdouble)); @@ -214,7 +212,7 @@ #ifdef COMPILER2 if (CodeCacheSegmentSize < (uintx)OptoLoopAlignment) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeCacheSegmentSize (" UINTX_FORMAT ") must be " "larger than or equal to OptoLoopAlignment (" INTX_FORMAT ") " "to align inner loops\n", @@ -230,7 +228,7 @@ #ifdef SOLARIS if ((value < MinimumPriority || value > MaximumPriority) && (value != -1) && (value != -FXCriticalPriority)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CompileThreadPriority (" INTX_FORMAT ") must be " "between %d and %d inclusively or -1 (means no change) " "or %d (special value for critical thread class/priority)\n", @@ -245,7 +243,7 @@ JVMFlag::Error CodeEntryAlignmentConstraintFunc(intx value, bool verbose) { #ifdef SPARC if (CodeEntryAlignment % relocInfo::addr_unit() != 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeEntryAlignment (" INTX_FORMAT ") must be " "multiple of NOP size\n", CodeEntryAlignment); return JVMFlag::VIOLATES_CONSTRAINT; @@ -253,14 +251,14 @@ #endif if (!is_power_of_2(value)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeEntryAlignment (" INTX_FORMAT ") must be " "a power of two\n", CodeEntryAlignment); return JVMFlag::VIOLATES_CONSTRAINT; } if (CodeEntryAlignment < 16) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "CodeEntryAlignment (" INTX_FORMAT ") must be " "greater than or equal to %d\n", CodeEntryAlignment, 16); @@ -272,7 +270,7 @@ JVMFlag::Error OptoLoopAlignmentConstraintFunc(intx value, bool verbose) { if (!is_power_of_2(value)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "OptoLoopAlignment (" INTX_FORMAT ") " "must be a power of two\n", value); @@ -282,7 +280,7 @@ // Relevant on ppc, s390, sparc. Will be optimized where // addr_unit() == 1. if (OptoLoopAlignment % relocInfo::addr_unit() != 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "OptoLoopAlignment (" INTX_FORMAT ") must be " "multiple of NOP size (%d)\n", value, relocInfo::addr_unit()); @@ -294,7 +292,7 @@ JVMFlag::Error ArraycopyDstPrefetchDistanceConstraintFunc(uintx value, bool verbose) { if (value >= 4032) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "ArraycopyDstPrefetchDistance (" UINTX_FORMAT ") must be" "between 0 and 4031\n", value); return JVMFlag::VIOLATES_CONSTRAINT; @@ -305,7 +303,7 @@ JVMFlag::Error ArraycopySrcPrefetchDistanceConstraintFunc(uintx value, bool verbose) { if (value >= 4032) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "ArraycopySrcPrefetchDistance (" UINTX_FORMAT ") must be" "between 0 and 4031\n", value); return JVMFlag::VIOLATES_CONSTRAINT; @@ -317,7 +315,7 @@ JVMFlag::Error TypeProfileLevelConstraintFunc(uintx value, bool verbose) { for (int i = 0; i < 3; i++) { if (value % 10 > 2) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "Invalid value (" UINTX_FORMAT ") " "in TypeProfileLevel at position %d\n", value, i); return JVMFlag::VIOLATES_CONSTRAINT; @@ -339,7 +337,7 @@ #ifdef COMPILER2 JVMFlag::Error InteriorEntryAlignmentConstraintFunc(intx value, bool verbose) { if (InteriorEntryAlignment > CodeEntryAlignment) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "InteriorEntryAlignment (" INTX_FORMAT ") must be " "less than or equal to CodeEntryAlignment (" INTX_FORMAT ")\n", InteriorEntryAlignment, CodeEntryAlignment); @@ -348,7 +346,7 @@ #ifdef SPARC if (InteriorEntryAlignment % relocInfo::addr_unit() != 0) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "InteriorEntryAlignment (" INTX_FORMAT ") must be " "multiple of NOP size\n"); return JVMFlag::VIOLATES_CONSTRAINT; @@ -356,7 +354,7 @@ #endif if (!is_power_of_2(value)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "InteriorEntryAlignment (" INTX_FORMAT ") must be " "a power of two\n", InteriorEntryAlignment); return JVMFlag::VIOLATES_CONSTRAINT; @@ -370,7 +368,7 @@ #endif if (InteriorEntryAlignment < minimum_alignment) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "InteriorEntryAlignment (" INTX_FORMAT ") must be " "greater than or equal to %d\n", InteriorEntryAlignment, minimum_alignment); @@ -382,7 +380,7 @@ JVMFlag::Error NodeLimitFudgeFactorConstraintFunc(intx value, bool verbose) { if (value < MaxNodeLimit * 2 / 100 || value > MaxNodeLimit * 40 / 100) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "NodeLimitFudgeFactor must be between 2%% and 40%% " "of MaxNodeLimit (" INTX_FORMAT ")\n", MaxNodeLimit); @@ -396,7 +394,7 @@ JVMFlag::Error RTMTotalCountIncrRateConstraintFunc(int value, bool verbose) { #if INCLUDE_RTM_OPT if (UseRTMLocking && !is_power_of_2(RTMTotalCountIncrRate)) { - CommandLineError::print(verbose, + JVMFlag::printError(verbose, "RTMTotalCountIncrRate (" INTX_FORMAT ") must be a power of 2, resetting it to 64\n", RTMTotalCountIncrRate);