Integrated: 8358339: Handle MethodCounters::_method backlinks after JDK-8355003

Aleksey Shipilev shade at openjdk.org
Wed Jun 4 21:34:55 UTC 2025


On Mon, 2 Jun 2025 18:41:42 GMT, Aleksey Shipilev <shade 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`

This pull request has now been integrated.

Changeset: 3cf3e4bb
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3cf3e4bbec26a84d77cb7a3125a60ba1e1e4ee97
Stats:     10 lines in 3 files changed: 10 ins; 0 del; 0 mod

8358339: Handle MethodCounters::_method backlinks after JDK-8355003

Reviewed-by: coleenp, kvn, iveresov

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

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


More information about the hotspot-dev mailing list