[master] RFR: OMWorld: Remove BasicLock* restrictions [v2]

Stefan Karlsson stefank at openjdk.org
Tue Apr 23 13:11:43 UTC 2024


On Tue, 23 Apr 2024 12:22:08 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> This is based on #159 
>> 
>> The main idea is to remove the restrictions where the `BasicLock*` may be missing when calling into the runtime. This is only an issue on x86_32. For now simply call into the runtime at the places where the registers are lacking. `quick_enter` should take care of the cases where we otherwise would have skipped calling into the runtime, as x86_32 calls into the runtime regardless (to get the thread) this may even be performance neutral.
>
> Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
> 
>  - Merge remote-tracking branch 'upstream_lilliput/master' into lilliput-om-always-take-basiclock
>  - Merge branch 'usptream_lilliput:pr/159' into lilliput-om-always-take-basiclock
>  - Introduce CacheSetter and move cache updates out of inflate_and_enter
>  - Update src/hotspot/share/runtime/lightweightSynchronizer.hpp
>    
>    Co-authored-by: Stefan Karlsson <stefan.karlsson at oracle.com>
>  - Cleanup after 24ed7d7: Fix missed lock change
>  - Remove x86_32 imposed limitations on BasicLock*
>  - Unify x86 and x64 C2_MacroAssembler::fast_unlock_lightweight
>  - Remove monitorenter_obj
>  - Fix missed lock change
>  - Cleanup ObjectMonitor::enter and LightweightSynchronizer::inflate_and_enter
>  - ... and 1 more: https://git.openjdk.org/lilliput/compare/44f1b602...d5472ef3

src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp line 72:

> 70:     lightweight_lock(disp_hdr, obj, hdr, thread, tmp, slow_case);
> 71: #else
> 72:     movptr(hdr, Address(obj, oopDesc::mark_offset_in_bytes()));

Maybe add a comment about this null-check?

src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp line 1215:

> 1213: 
> 1214:       // Check if recursive.
> 1215:       cmpptr(Address(monitor,ObjectMonitor::recursions_offset()),0);

Suggestion:

      cmpptr(Address(monitor,ObjectMonitor::recursions_offset()), 0);

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

PR Review Comment: https://git.openjdk.org/lilliput/pull/160#discussion_r1576228602
PR Review Comment: https://git.openjdk.org/lilliput/pull/160#discussion_r1576229484


More information about the lilliput-dev mailing list