RFR: 8358339: Handle MethodCounters::_method backlinks after JDK-8355003
Aleksey Shipilev
shade at openjdk.org
Wed Jun 4 09:05:16 UTC 2025
On Tue, 3 Jun 2025 12:00:03 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> 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`
>> - [x] Linux x86_64 server fastdebug, `tier1`
>> - [x] Linux x86_64 server fastdebug, `all`
>
> And MethodCounters shouldn't be inhertited from Metadata, they're inherited from MetaspaceObj in mainline. We want to avoid virtual function pointers in this type.
Before I proceed anywhere with this, I need to understand what @coleenp saw in all this :)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25599#issuecomment-2939215148
More information about the hotspot-dev
mailing list