8358334: C2/Shenandoah: incorrect execution with Unsafe #1901
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Patch doesn't apply cleanly:
jdk21u still has IU barriers: context for some of the changes is
different.
Because of IU barriers, there's an extra call to
fix_ctrl()
forwhich the renaming to
nodes_above_barriers
must be applied.The initial patch makes a subtle change that doesn't affect jdk
25/26 in the code that was
refactored.
ShenandoahBarrierC2Support::push_data_inputs_at_control()
is introduced with logic:
which replaces the same logic in
ShenandoahBarrierC2Support::fix_ctrl()
but also a slightlydifferent logic in
ShenandoahBarrierC2Support::is_dominator_same_ctrl()
:that is, it uses
ctrl_or_self()
which works for both data nodesand control nodes but the new method uses
has_ctrl(in) && get_ctrl(in)
which can only be true for data nodes. That changecauses failures in jdk 21 again because of IU barriers that produce
a new memory state when expanded and need the logic from
MemoryGraphFixer
. What I propose in this backport to be on thesafe side is to leave
ShenandoahBarrierC2Support::is_dominator_same_ctrl()
alone (notapply that part of the refactoring).
Tested with hotspot_gc_shenandoah + tier1 with -XX:+UseShenandoahGC
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1901/head:pull/1901
$ git checkout pull/1901
Update a local copy of the PR:
$ git checkout pull/1901
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1901/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1901
View PR using the GUI difftool:
$ git pr show -t 1901
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1901.diff
Using Webrev
Link to Webrev Comment