RFR: 8336944: Shenandoah: Should only relativize stack chunks for successful evacuations

Roman Kennke rkennke at openjdk.org
Tue Jul 23 09:59:37 UTC 2024


On Tue, 23 Jul 2024 09:50:57 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Current code effectively relativizes a private copy of the object, so there is no question about the races over it. New code relativizes when that private copy is now public. This looks less safer than before.
> 
> So my question is then: why is relativizing a private copy problematic?

IIRC, it requires the Klass*. With Lilliput, it is possible that the copy that lost the CAS copied the fwd-ptr that the winning thread installed. I guess we could follow through that fwd-ptr and grab the Klass* from the winning copy, but why bother?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/20288#issuecomment-2244772101


More information about the hotspot-gc-dev mailing list