RFR: 8299032: Interface IN_NATIVE oop stores for C2

Erik Österlund eosterlund at openjdk.org
Fri Dec 23 14:02:30 UTC 2022


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.

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

Commit messages:
 - 8299032: Interface IN_NATIVE oop stores for C2

Changes: https://git.openjdk.org/jdk/pull/11777/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11777&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8299032
  Stats: 8 lines in 2 files changed: 0 ins; 7 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11777.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11777/head:pull/11777

PR: https://git.openjdk.org/jdk/pull/11777


More information about the hotspot-dev mailing list