Integrated: 8350086: Inline hot Method accessors for faster task selection

Aleksey Shipilev shade at openjdk.org
Mon Feb 17 09:24:30 UTC 2025


On Fri, 14 Feb 2025 14:47:23 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> These methods show up prominently on Leyden profiles, as compilation policy asks these properties for methods very often during compile task selection:
>  - `Method::invocation_count`
>  - `Method::backedge_count`
>  - `Method::highest_comp_level`
> 
> We can move the definitions for these methods to method.inline.hpp to make them eligible for better inlining.
> 
> `interpreter_invocation_count()` method is a bit weird, looks like a leftover from [JDK-8251462](https://bugs.openjdk.org/browse/JDK-8251462). Removing it would prompt more cleanups and renamings in `ciMethod`, so I would leave it for future enhancement.
> 
> Additional testing: 
>  - [x] Spot-checked Leyden profiles, methods are now fully inlined into hot `CompilerBroker` methods
>  - [x] Ad-hoc Leyden benchmarks show minor improvements (< 1%) for time spent in compiler threads

This pull request has now been integrated.

Changeset: b1b48286
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/b1b48286a6cbee8a9f96d739ab437915c573022c
Stats:     79 lines in 6 files changed: 41 ins; 33 del; 5 mod

8350086: Inline hot Method accessors for faster task selection

Reviewed-by: kvn, coleenp, aph, vlivanov

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

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


More information about the hotspot-dev mailing list