RFR: 8256011: Shenandoah: Don't resurrect finalizably reachable objects [v12]
Roman Kennke
rkennke at openjdk.java.net
Thu Nov 12 12:41:12 UTC 2020
> 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 incrementally with two additional commits since the last revision:
- Avoid null-check and skip cset-check on non-strong refs in C1 LRB stub
- Call weak-LRB with ON_WEAK_OOP_REF, not ON_UNKNOWN_OOP_REF (cosmetic)
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/1109/files
- new: https://git.openjdk.java.net/jdk/pull/1109/files/29347682..83c07cb8
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=1109&range=11
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=1109&range=10-11
Stats: 26 lines in 2 files changed: 6 ins; 7 del; 13 mod
Patch: https://git.openjdk.java.net/jdk/pull/1109.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1109/head:pull/1109
PR: https://git.openjdk.java.net/jdk/pull/1109
More information about the shenandoah-dev
mailing list