--- old/src/hotspot/share/opto/parseHelper.cpp 2018-11-28 16:40:16.335028837 -0800 +++ new/src/hotspot/share/opto/parseHelper.cpp 2018-11-28 16:40:15.891987631 -0800 @@ -471,7 +471,7 @@ if (osr_site) { ciProfileData* data = md->bci_to_data(cur_bci); assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch"); - int limit = (CompileThreshold + int limit = ((int64_t)CompileThreshold * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100; test_for_osr_md_counter_at(md, data, JumpData::taken_offset(), limit); } @@ -479,7 +479,7 @@ // With method data update off, use the invocation counter to trigger an // OSR compilation, as done in the interpreter. if (osr_site) { - int limit = (CompileThreshold * OnStackReplacePercentage) / 100; + int limit = ((int64_t)CompileThreshold * OnStackReplacePercentage) / 100; increment_and_test_invocation_counter(limit); } }