RFR: 8357424: [JVMCI] Avoid incrementing decompilation count for hosted compiled nmethod [v9]

Doug Simon dnsimon at openjdk.org
Wed Jul 2 09:10:45 UTC 2025


On Wed, 2 Jul 2025 07:22:29 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:

>> Hosted Truffle compilations are installed on the OptimizedCallTarget#profiledPERoot method. Any deoptimization contributes to its decompile count, which can easily exceed the PerMethodRecompilationCutoff threshold, permanently preventing highest tier compilation on this method. This PR exempts hosted compilations from this cutoff by ensuring their decompile count is not incremented for hosted compiled nmethods.
>
> Yudi Zheng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
> 
>  - address comments
>  - Merge remote-tracking branch 'upstream/master' into JDK-8357424
>  - Merge tag 'jdk-26+3' into JDK-8357424
>    
>    Added tag jdk-26+3 for changeset 08b1fa4c
>  - Merge tag 'jdk-26+2' into JDK-8357424
>    
>    Added tag jdk-26+2 for changeset d7aa3498
>  - fix compilation error
>  - address comments
>  - Merge remote-tracking branch 'upstream/master' into JDK-8357424
>  - address comments
>  - address comments
>  - update copyright
>  - ... and 1 more: https://git.openjdk.org/jdk/compare/f01309be...022546a0

src/hotspot/share/code/nmethod.cpp line 1939:

> 1937:   // Could be gated by ProfileTraps, but do not bother...
> 1938: #if INCLUDE_JVMCI
> 1939:   // Deoptimizations from non-default (non-CompileBroker) compilations should not

Suggestion:

  // Deoptimization count is used by the CompileBroker to reason about compilations
  // it requests so do not pollute the count for deoptimizations in non-default (i.e.
  // non-CompilerBroker) compilations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25356#discussion_r2179536365


More information about the hotspot-dev mailing list