RFR: 8299032: Interface IN_NATIVE oop stores for C2
Stefan Karlsson
stefank at openjdk.org
Mon Jan 9 10:38:51 UTC 2023
On Fri, 23 Dec 2022 13:54:44 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:
> Loom added the first IN_NATIVE oop store to C2 code, when switching the current virtual thread of a platform thread. Instead of interfacing this properly, a raw store was used. But a future GC algorithm, such as generational ZGC, might not work well with raw stores. We should add support to the access API for this. Looks like Shenandoah was already missing something here as they do concurrent root processing requiring SATB barriers on IN_NATIVE oop stores. It is not in the scope of this PR to fix the Shenandoah bug - someone working on Shenandoah should do this. This PR merely adds an interface such that GCs that need to do something different here, can do that. Serial, Parallel and G1 don't need to do anything for IN_NATIVE stores as they do STW root processing. ZGC doesn't (yet) have store barriers at all, and hence doesn't need to do anything special either.
Marked as reviewed by stefank (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/11777
More information about the hotspot-dev
mailing list