RFR: 8290062: Remove nmethodLocker for nmethods on-stack
Erik Österlund
eosterlund at openjdk.org
Sat Jul 30 07:11:36 UTC 2022
On Mon, 11 Jul 2022 07:49:09 GMT, Axel Boldt-Christmas <duke at openjdk.org> wrote:
> From JBS:
>
>> The nmethodLocker is pretty nasty as it prevents an nmethod from being freed, but without really keeping it alive. We would like to minimize its use. The most obvious places where it can be removed, is when "protecting" nmethods that are already on-stack. Neither the sweeper nor the GC is interested in making nmethods on-stack not live. These ones simply do not do anything.
>
> Removed the `nmethodLocker` where the nmethod is a caller on the stack.
>
> Testing: tier1-7
The nmethodLockers targeted in this PR are "protecting" nmethods that are already on the stack. Nmethods that are on the stack are kept alive by both sweeper and GC as they both walk stacks. Therefore, using nmethodLocker for on-stack nmethods is redundant.
-------------
PR: https://git.openjdk.org/jdk/pull/9444
More information about the hotspot-dev
mailing list