src/hotspot/share/oops/methodCounters.hpp
changeset 53002 9d60798b21af
parent 50589 e5d741569070
child 53244 9807daeb47c4
--- a/src/hotspot/share/oops/methodCounters.hpp	Wed Dec 12 22:23:48 2018 -0800
+++ b/src/hotspot/share/oops/methodCounters.hpp	Wed Dec 12 23:08:01 2018 -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 = (int)((int64_t)compile_threshold * (OnStackReplacePercentage - InterpreterProfilePercentage) / 100);
     } else {
-      _interpreter_backward_branch_limit = ((compile_threshold * OnStackReplacePercentage) / 100) << InvocationCounter::count_shift;
+      _interpreter_backward_branch_limit = (int)(((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;