--- old/src/hotspot/share/interpreter/invocationCounter.cpp 2018-12-02 21:43:03.168063439 -0800 +++ new/src/hotspot/share/interpreter/invocationCounter.cpp 2018-12-02 21:43:02.699019985 -0800 @@ -153,9 +153,9 @@ // don't need the shift by number_of_noncount_bits, but we do need to adjust // the factor by which we scale the threshold. if (ProfileInterpreter) { - InterpreterBackwardBranchLimit = (CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; + InterpreterBackwardBranchLimit = (int)((int64_t)CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100); } else { - InterpreterBackwardBranchLimit = ((CompileThreshold * OnStackReplacePercentage) / 100) << number_of_noncount_bits; + InterpreterBackwardBranchLimit = (int)(((int64_t)CompileThreshold * OnStackReplacePercentage / 100) << number_of_noncount_bits); } assert(0 <= InterpreterBackwardBranchLimit,