Due to performance considerations, JDK-8290892 eliminates ReachabilityFence (RF) nodes with constant referent. (There's PreserveReachabilityFencesOnConstants diagnostic flag to keep the RF node, but it is turned off by default).
There's a more efficient way to support RF with constant referent which relies on nmethod dependencies machinery. OOPs embedded in nmethods are treated as weak reference, so when an OOP is GCed corresponding method is invalidated and such behavior satisfies ReachabilityFence contract.
There's a more efficient way to support RF with constant referent which relies on nmethod dependencies machinery. OOPs embedded in nmethods are treated as weak reference, so when an OOP is GCed corresponding method is invalidated and such behavior satisfies ReachabilityFence contract.
- relates to
-
JDK-8290892 C2: Intrinsify Reference.reachabilityFence
-
- In Progress
-