RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v2]

Robbin Ehn rehn at openjdk.org
Mon Feb 20 09:26:30 UTC 2023


On Fri, 17 Feb 2023 22:25:43 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Robbin Ehn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review fixes
>
> src/hotspot/share/code/codeCache.cpp line 1392:
> 
>> 1390:     if (nm->is_marked_for_deoptimization() && !nm->has_been_deoptimized() && nm->can_be_deoptimized()) {
>> 1391:       nm->make_not_entrant();
>> 1392:       nm->make_deoptimized();
> 
> `CodeCache::make_marked_nmethods_deoptimized()` used to call
> `make_nmethod_deoptimized(nm)` which made a couple of checks
> before it called `nm->make_deoptimized()`. `make_deoptimized()`
> does not make these checks so why are they no longer needed?
> 
> Here's the removed code:
> 
> void CodeCache::make_nmethod_deoptimized(CompiledMethod* nm) {
>   if (nm->is_marked_for_deoptimization() && nm->can_be_deoptimized()) {
>     nm->make_deoptimized();
>   }
> }

If the method can't be deoptimized we should not make "not entrant".
If it is already deoptimize no need to try to make it "not entrant" once more.
If it's not marked we shouldn't make it "not entrant".
So only if we make it "not entrant" we should also make_deopt().

This is checked at the line just before:

if (nm->is_marked_for_deoptimization() && !nm->has_been_deoptimized() && nm->can_be_deoptimized()) {
      nm->make_not_entrant();
      nm->make_deoptimized();
}


So we do not need to recheck it.

But I'll add a check that we do not re-patch the nops.

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

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


More information about the hotspot-dev mailing list