RFR: 8364111: InstanceMirrorKlass iterators should handle CDS and hidden classes consistently [v2]

Aleksey Shipilev shade at openjdk.org
Fri Jul 25 17:27:34 UTC 2025


> See the bug for more investigation. I think the root cause is already fixed in one of the `InstanceMirrorKlass` iterators, but not in the other one. Additionally, only one iterator handles the hidden classes. Also, there is a stale comment about CMS that apparently prevents us from asserting `is_primitive`, which is not relevant anymore.
> 
> So this PR commons out the metadata handling on both iterators, which fixes the GenShen+CDS bug, likely fixes hidden classes bug somewhere, and prevents the omission like this from happening again.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, Generational Shenandoah + CDS bugs are not reproducing now
>  - [x] Linux x86_64 server fastdebug, `tier1`
>  - [x] Linux x86_64 server fastdebug, `all`

Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:

  Drop assert, more discussion

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26477/files
  - new: https://git.openjdk.org/jdk/pull/26477/files/5e4153ae..bc853287

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

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

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


More information about the hotspot-dev mailing list