RFR: 8256011: Shenandoah: Don't resurrect finalizably reachable objects [v8]
Aleksey Shipilev
shade at openjdk.java.net
Wed Nov 11 16:59:04 UTC 2020
On Wed, 11 Nov 2020 15:55:19 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> In the weak-LRB we currently return referents when it is 'marked', that is when it's either reachable strongly or through a finalizable object. This means a finalizable object can be resurrected by Reference.get(), which is wrong. Only truly strongly reachable objects should be returned by Reference.get() during weak-reference-processing.
>>
>> I had to reconsider the way we call into runtime-LRBs from generated code for these reasons:
>> - We need to distinguish phantom, weak and strong reference strength, and native vs in-heap access. Those are two orthogonal dimensions
>> - We can have strong and phantom native referents, and strong and weak in-heap referents
>> - Native referents are never compressed
>>
>> Note that this depends on PR#1140.
>>
>> Testing:
>> - [x] hotspot_gc_shenandoah (x86_64, x64_32, aarch64)
>> - [x] tier1 +UseShenandoahGC +ShenandoahVerify
>> - [x] tier2 +UseShenandoahGC +ShenandoahVerify
>
> Roman Kennke has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 18 additional commits since the last revision:
>
> - Fix/invert condition in CmpP optimization
> - Fix after merge
> - Merge branch 'master' into JDK-8256011
> - Merge branch 'master' into JDK-8256011
> - Don't make phantom-access narrow (mistake when doing 32bit parts
> - Remove superfluous LP64 in aarch64 part
> - Fixes/missing parts for x86_64
> - Aarch64 parts
> - Whitespace changes
> - Mask decorators in hash/cmp, not in ctor
> - ... and 8 more: https://git.openjdk.java.net/jdk/compare/682e0e24...c0ee9346
This looks fine to me. Good to go, assuming the tests pass.
-------------
Marked as reviewed by shade (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1109
More information about the shenandoah-dev
mailing list