mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8211034: OnStackReplacePercentage option checking has bugs
Fixed the constraint checks Reviewed-by: kvn
This commit is contained in:
parent
966aaa1f9b
commit
79d7ae7633
5 changed files with 39 additions and 33 deletions
|
@ -471,15 +471,15 @@ void Parse::profile_taken_branch(int target_bci, bool force_update) {
|
|||
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
|
||||
* (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100;
|
||||
int limit = (int)((int64_t)CompileThreshold
|
||||
* (OnStackReplacePercentage - InterpreterProfilePercentage) / 100);
|
||||
test_for_osr_md_counter_at(md, data, JumpData::taken_offset(), limit);
|
||||
}
|
||||
} else {
|
||||
// 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 = (int)((int64_t)CompileThreshold * OnStackReplacePercentage / 100);
|
||||
increment_and_test_invocation_counter(limit);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue