Skip to content

Commit

Permalink
8322636: [JVMCI] HotSpotSpeculationLog can be inconsistent across a s…
Browse files Browse the repository at this point in the history
…ingle compile

Reviewed-by: dnsimon, never
  • Loading branch information
David Leopoldseder authored and Tom Rodriguez committed Jan 5, 2024
1 parent 46965a0 commit 35a1b77
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,14 @@ byte[] getFlattenedSpeculations(boolean validate) {
return result;
}

/**
* @return {@code true} if the given speculation can be performed, i.e., it never failed so far, otherwise
* return {@code false}. Note, that this method returns consistent results for any given speculation for the
* entire lifetime of the enclosing SpeculationLog object. This means that speculations failed during a
* compilation will not be updated.
*/
@Override
public boolean maySpeculate(SpeculationReason reason) {
if (failedSpeculations == null) {
collectFailedSpeculations();
}
if (failedSpeculations != null && failedSpeculations.length != 0) {
byte[] encoding = encode(reason);
return !contains(failedSpeculations, 0, encoding);
Expand Down

1 comment on commit 35a1b77

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.