RFR: 8255534: Shenandoah: Fix CmpP optimization wrt native-LRB [v3]
Roman Kennke
rkennke at openjdk.java.net
Thu Oct 29 11:08:01 UTC 2020
> JDK-8254314 introduced the following code:
>
> if (in1->bottom_type() == TypePtr::NULL_PTR &&
> (in1->Opcode() != Op_ShenandoahLoadReferenceBarrier || !((ShenandoahLoadReferenceBarrierNode*)in1)->is_native())) {
> in2 = step_over_gc_barrier(in2);
> }
>
> However, the check for LRB and !native are the wrong way around: they should check if *in2* are not native LRB.
>
> The bug is currently only observed in the conc-weakrefs branch, but may manifest (rarely) in mainline too.
>
> I am also putting in some refactoring to avoid duped code for good measure.
>
> Testing: hotspot_gc_shenandoah (also in conc-weakrefs-branch where it manifests)
Roman Kennke has updated the pull request incrementally with two additional commits since the last revision:
- Inline (i.e. revert) maybe_step_over_cmpp_inputs()
- Clarify comment in maybe_step_over_cmpp_inputs()
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/902/files
- new: https://git.openjdk.java.net/jdk/pull/902/files/922d51ff..6169f948
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=902&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=902&range=01-02
Stats: 24 lines in 2 files changed: 11 ins; 11 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/902.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/902/head:pull/902
PR: https://git.openjdk.java.net/jdk/pull/902
More information about the shenandoah-dev
mailing list