src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp	Tue Apr 26 13:47:37 2016
--- new/src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp	Tue Apr 26 13:47:37 2016

*** 87,161 **** --- 87,155 ---- } else { return Flag::SUCCESS; } } ! Flag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) { ! if (value < 0) { CommandLineError::print(verbose, "Unable to determine system-specific value for AllocatePrefetchDistance. " "Please provide appropriate value, if unsure, use 0 to disable prefetching\n"); return Flag::VIOLATES_CONSTRAINT; } return Flag::SUCCESS; } Flag::Error AllocatePrefetchInstrConstraintFunc(intx value, bool verbose) { intx max_value = max_intx; ! Flag::Error AllocatePrefetchStyleConstraintFunc(intx value, bool verbose) { ! intx max_value; #if defined(SPARC) max_value = 1; #elif defined(X86) max_value = 3; + #else + max_value = 2; #endif if (value < 0 || value > max_value) { CommandLineError::print(verbose, ! "AllocatePrefetchInstr (" INTX_FORMAT ") must be " ! "AllocatePrefetchStyle (" INTX_FORMAT ") must be " "between 0 and " INTX_FORMAT "\n", value, max_value); return Flag::VIOLATES_CONSTRAINT; } return Flag::SUCCESS; } ! Flag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) { ! intx max_value = 512; ! if (value < 1 || value > max_value) { ! Flag::Error AllocatePrefetchDistanceConstraintFunc(intx value, bool verbose) { ! intx min_value; ! if (AllocatePrefetchStyle == 3) { + min_value = wordSize; + } else { + min_value = 0; + } + + if (value < min_value || value > 512) { CommandLineError::print(verbose, ! "AllocatePrefetchStepSize (" INTX_FORMAT ") " ! "must be between 1 and %d\n", ! AllocatePrefetchStepSize, max_value); ! "AllocatePrefetchDistance (" INTX_FORMAT ") must be " ! "between " INTX_FORMAT " and " INTX_FORMAT "\n", ! AllocatePrefetchDistance, min_value, 512); return Flag::VIOLATES_CONSTRAINT; } if (AllocatePrefetchDistance % AllocatePrefetchStepSize != 0) { + return Flag::SUCCESS; + } + + Flag::Error AllocatePrefetchStepSizeConstraintFunc(intx value, bool verbose) { + if (AllocatePrefetchStyle == 3) { + if (value % wordSize != 0) { CommandLineError::print(verbose, "AllocatePrefetchDistance (" INTX_FORMAT ") " "%% AllocatePrefetchStepSize (" INTX_FORMAT ") " "= " INTX_FORMAT " " "must be 0\n", AllocatePrefetchDistance, AllocatePrefetchStepSize, AllocatePrefetchDistance % AllocatePrefetchStepSize); + "AllocatePrefetchStepSize (" INTX_FORMAT ") must be multiple of %d\n", + value, wordSize); return Flag::VIOLATES_CONSTRAINT; } + } + return Flag::SUCCESS; + } /* The limit of 64 for the quotient of AllocatePrefetchDistance and AllocatePrefetchSize * originates from the limit of 64 for AllocatePrefetchLines/AllocateInstancePrefetchLines. ! * If AllocatePrefetchStyle == 2, the quotient from above is used in PhaseMacroExpand::prefetch_allocation() * to determine the number of lines to prefetch. For other values of AllocatePrefetchStyle, * AllocatePrefetchDistance and AllocatePrefetchSize is used. For consistency, all these * quantities must have the same limit (64 in this case). */ ! if (AllocatePrefetchDistance / AllocatePrefetchStepSize > 64) { + Flag::Error AllocatePrefetchInstrConstraintFunc(intx value, bool verbose) { + intx max_value = max_intx; ! #if defined(SPARC) + max_value = 1; + #elif defined(X86) + max_value = 3; + #endif ! if (value < 0 || value > max_value) { CommandLineError::print(verbose, ! "AllocatePrefetchDistance (" INTX_FORMAT ") too large or " "AllocatePrefetchStepSize (" INTX_FORMAT ") too small; " "try decreasing/increasing values so that " "AllocatePrefetchDistance / AllocatePrefetchStepSize <= 64\n", AllocatePrefetchDistance, AllocatePrefetchStepSize, AllocatePrefetchDistance % AllocatePrefetchStepSize); ! "AllocatePrefetchInstr (" INTX_FORMAT ") must be " + "between 0 and " INTX_FORMAT "\n", value, max_value); return Flag::VIOLATES_CONSTRAINT; } return Flag::SUCCESS; }

src/share/vm/runtime/commandLineFlagConstraintsCompiler.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File