< prev index next >

src/hotspot/share/runtime/flags/jvmFlagConstraintsCompiler.cpp

Print this page

        

*** 143,192 **** return JVMFlag::SUCCESS; } JVMFlag::Error OnStackReplacePercentageConstraintFunc(intx value, bool verbose) { ! int backward_branch_limit; if (ProfileInterpreter) { ! if (OnStackReplacePercentage < InterpreterProfilePercentage) { JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n", ! OnStackReplacePercentage, InterpreterProfilePercentage); return JVMFlag::VIOLATES_CONSTRAINT; } ! backward_branch_limit = ((CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100) ! << InvocationCounter::count_shift; ! ! if (backward_branch_limit < 0) { JVMFlag::printError(verbose, ! "CompileThreshold * (InterpreterProfilePercentage - OnStackReplacePercentage) / 100 = " INTX_FORMAT " " "must be between 0 and %d, try changing " "CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n", ! (CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100, INT_MAX >> InvocationCounter::count_shift); return JVMFlag::VIOLATES_CONSTRAINT; } } else { ! if (OnStackReplacePercentage < 0 ) { JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " ! "non-negative\n", OnStackReplacePercentage); return JVMFlag::VIOLATES_CONSTRAINT; } ! backward_branch_limit = ((CompileThreshold * OnStackReplacePercentage) / 100) ! << InvocationCounter::count_shift; ! ! if (backward_branch_limit < 0) { JVMFlag::printError(verbose, "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " " "must be between 0 and %d, try changing " "CompileThreshold and/or OnStackReplacePercentage\n", ! (CompileThreshold * OnStackReplacePercentage) / 100, INT_MAX >> InvocationCounter::count_shift); return JVMFlag::VIOLATES_CONSTRAINT; } } return JVMFlag::SUCCESS; --- 143,189 ---- return JVMFlag::SUCCESS; } JVMFlag::Error OnStackReplacePercentageConstraintFunc(intx value, bool verbose) { ! int64_t max_percentage_limit = ((int64_t)INT_MAX>>InvocationCounter::count_shift)*100; ! max_percentage_limit = CompileThreshold == 0 ? max_percentage_limit : max_percentage_limit/CompileThreshold; ! if (ProfileInterpreter) { ! if (value < InterpreterProfilePercentage) { JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " "larger than InterpreterProfilePercentage (" INTX_FORMAT ")\n", ! value, InterpreterProfilePercentage); return JVMFlag::VIOLATES_CONSTRAINT; } ! max_percentage_limit += InterpreterProfilePercentage; ! if (value > max_percentage_limit) { JVMFlag::printError(verbose, ! "CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100 = " INTX_FORMAT " " "must be between 0 and %d, try changing " "CompileThreshold, InterpreterProfilePercentage, and/or OnStackReplacePercentage\n", ! (CompileThreshold * (value - InterpreterProfilePercentage)) / 100, INT_MAX >> InvocationCounter::count_shift); return JVMFlag::VIOLATES_CONSTRAINT; } } else { ! if (value < 0) { JVMFlag::printError(verbose, "OnStackReplacePercentage (" INTX_FORMAT ") must be " ! "non-negative\n", value); return JVMFlag::VIOLATES_CONSTRAINT; } ! if (value > max_percentage_limit) { JVMFlag::printError(verbose, "CompileThreshold * OnStackReplacePercentage / 100 = " INTX_FORMAT " " "must be between 0 and %d, try changing " "CompileThreshold and/or OnStackReplacePercentage\n", ! (CompileThreshold * value) / 100, INT_MAX >> InvocationCounter::count_shift); return JVMFlag::VIOLATES_CONSTRAINT; } } return JVMFlag::SUCCESS;
< prev index next >