--- old/src/hotspot/share/oops/methodCounters.hpp 2018-11-28 16:40:15.428944564 -0800 +++ new/src/hotspot/share/oops/methodCounters.hpp 2018-11-28 16:40:14.992904010 -0800 @@ -103,9 +103,9 @@ // If interpreter profiling is enabled, the backward branch limit // is compared against the method data counter rather than an invocation // counter, therefore no shifting of bits is required. - _interpreter_backward_branch_limit = (compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; + _interpreter_backward_branch_limit = ((int64_t)compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; } else { - _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift; + _interpreter_backward_branch_limit = (((int64_t)compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift; } _interpreter_profile_limit = ((compile_threshold * InterpreterProfilePercentage) / 100) << InvocationCounter::count_shift; _invoke_mask = right_n_bits(CompilerConfig::scaled_freq_log(Tier0InvokeNotifyFreqLog, scale)) << InvocationCounter::count_shift;