Integrated: 8355296: [leyden] Some methods are stuck at level=0 with -XX:-TieredCompilation

Aleksey Shipilev shade at openjdk.org
Wed Apr 23 17:28:59 UTC 2025


On Tue, 22 Apr 2025 18:09:38 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Discovered this originally when testing Persistent Profiles PR in Leyden. In short, the transition from level=0 would not go to level=4 ever for some methods, if we disable intermediate levels. I believe this is one the causes for at least some performance artifacts I seen in Leyden testing last week. 
> 
> There are two bugs:
>  1. In `CompilationPolicy::common`: Trivial/native method shortcut was lost, so trivial methods enter through the normal profiled policy. Maybe there was a good reason to lose it? Not clear...
>  2. In `CompilationPolicy::should_create_mdo`: When training data is used we _only_ create MDOs for methods that are referenced in TD. This has a major knock-on effect on _normal_ JIT compilations that want to see MDO invocation/backedge counters. Instead, MDO is missing, so interpreter only increments MCS counters, and then compilation policy misses the transitions.
> 
> (1) is really subsumed by (2), so we can really only do (2).
> 
> See reproducers and logs in the issue. More performance data in comments.
> 
> Additional testing:
>  - [x] Linux x86_64 server fastdebug, `runtime/cds`

This pull request has now been integrated.

Changeset: 98f45324
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/leyden/commit/98f4532416e1b2218d734aded01730f3a8c4154f
Stats:     32 lines in 1 file changed: 10 ins; 14 del; 8 mod

8355296: [leyden] Some methods are stuck at level=0 with -XX:-TieredCompilation

Reviewed-by: iveresov

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

PR: https://git.openjdk.org/leyden/pull/57


More information about the leyden-dev mailing list