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

Aleksey Shipilev shade at openjdk.org
Tue Jul 23 09:53:30 UTC 2024


On Mon, 22 Jul 2024 23:56:46 GMT, William Kemper <wkemper at openjdk.org> wrote:

> In some cases, different threads may race to evacuate an object. The race is won by "CAS"ing in the forwarding pointer. The threads that lose this race must "back out" their allocation. The work to relativize stack chunks should only happen for the thread that wins the evacuation race.

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?

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

PR Review: https://git.openjdk.org/jdk/pull/20288#pullrequestreview-2193512736


More information about the hotspot-gc-dev mailing list