RFR: 8358339: Handle MethodCounters::_method backlinks after JDK-8355003
Aleksey Shipilev
shade at openjdk.org
Mon Jun 2 18:46:02 UTC 2025
Found this when reading mainline-vs-premain webrev. [JDK-8355003](https://bugs.openjdk.org/browse/JDK-8355003) introduced a backlink to `Method*` in `MethodCounters`. I believe we need to handle that backlink at least in `CodeBuffer::finalize_oop_references()`. premain does this, while mainline does not. Also, amusingly, we have `MethodCounters::is_methodCounters`, but not the super-class `Metadata::is_methodCounters`.
I pulled in the hunks that use `is_methodCounters()` and `MethodCounters::method()` from premain into this PR.
Additional testing:
- [x] Linux x86_64 server fastdebug, `runtime/cds`
- [ ] Linux x86_64 server fastdebug, `tier1`
- [ ] Linux x86_64 server fastdebug, `all`
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/25599/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25599&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8358339
Stats: 10 lines in 3 files changed: 10 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/25599.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25599/head:pull/25599
PR: https://git.openjdk.org/jdk/pull/25599
More information about the hotspot-dev
mailing list