RFR: 8307532: Implement LM_LIGHTWEIGHT for Zero

Axel Boldt-Christmas aboldtch at openjdk.org
Tue Oct 1 09:33:39 UTC 2024


On Fri, 27 Sep 2024 15:16:52 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> This implements the remaining parts of LW locking in Zero. Much of the work has already been done by Axel, this basically only implements the missing part that handles synchronized JNI entries. I basically preserved the LM_LEGACY case, except that I shuffled the code a little to match what we do in monitorexit case in bytecodeInterpreter.cpp (but should be functionally equivalent). The LM_LIGHTWEIGHT and LM_MONITOR case (the latter of which has been broken, before) simply call into the runtime.
> 
> With this change, we can now remove the block in arguments.cpp that deals with missing LM_LIGHTWEIGHT support.
> 
> Testing:
>  - [x] bootcycle-images

The `LM_LIGHTWEIGHT` changes looks good to me.

This also enables `UseObjectMonitorTable`. I believe `BasicLock::object_monitor_cache()` must be modified as well. Assuming that both `ZERO` and a supported platform (e.g. `X86`) can and will be defined in the same build. 

`ZERO` should return `nullptr` in `BasicLock::object_monitor_cache()`  as well.

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

PR Review: https://git.openjdk.org/jdk/pull/21220#pullrequestreview-2339659847


More information about the hotspot-dev mailing list