RFR: 8357619: [JVMCI] Revisit phantom_ref parameter in JVMCINMethodData::get_nmethod_mirror [v2]

Doug Simon dnsimon at openjdk.org
Mon Jun 2 16:42:35 UTC 2025


> The point of the `phantom_ref` parameter (introduced by [JDK-8234359](https://bugs.openjdk.org/browse/JDK-8234359)) of `JVMCINMethodData::get_nmethod_mirror` is to avoid the special resurrection semantics of a phantom read when reading the field during GC, which is when `JVMCINMethodData::invalidate_nmethod_mirror` can be called.
> This case can be handled directly in `JVMCINMethodData::invalidate_nmethod_mirror` and so the `phantom_ref` parameter can be removed.

Doug Simon has updated the pull request incrementally with one additional commit since the last revision:

  still rely on get_nmethod_mirror in invalidate_nmethod_mirror

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25488/files
  - new: https://git.openjdk.org/jdk/pull/25488/files/0dcb1c78..7456988a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25488&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25488&range=00-01

  Stats: 6 lines in 1 file changed: 3 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/25488.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25488/head:pull/25488

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


More information about the hotspot-compiler-dev mailing list