RFR: 8300926: Several startup regressions ~6-70% in 21-b6 all platforms [v2]
Robbin Ehn
rehn at openjdk.org
Mon Feb 20 09:31:31 UTC 2023
On Fri, 17 Feb 2023 22:29:06 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/nmethod.cpp line 1166:
>
>> 1164: set_deoptimized_done();
>> 1165: return;
>> 1166: }
>
> I don't understand this check-and-bailout logic at all. If continuations are
> not enabled, then why does `nmethod::make_deoptimized()` do nothing?
> This isn't an issue introduced by your patch, but I just happened to notice
> when I was reading thru...
We two deopts mechanisms:
* Patching return PC in frames for nmethod that are no longer valid.
Done by handshaking all threads and walking their stack.
* Virtual threads stacks are only patched this way when mounted.
If we have a million VT we can't walk the entire heap and patch PC is all these stacks.
Instead there is nop-sledge after each calls from nmethods, so patch these to jump to the deopt
when returning into a deopted nmethod.
Calls into VM (causing the VT to pin) do not have these nop-sledges, so when using Loom, both mechanism is needed.
-------------
PR: https://git.openjdk.org/jdk/pull/12585
More information about the hotspot-dev
mailing list