RFR: 8319797: Recursive lightweight locking: Runtime implementation [v6]

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Nov 23 07:41:09 UTC 2023


On Wed, 22 Nov 2023 20:46:26 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> src/hotspot/share/runtime/synchronizer.cpp line 498:
>> 
>>> 496:                p2i(monitor->owner()), p2i(current), monitor->object()->mark_acquire().value());
>>> 497:         assert(!lock_stack.is_full(), "must have made room here");
>>> 498:       }
>> 
>> This is an interesting idea. I'll have to see how you test this code later on...
>
> Update: I didn't see an explicit test case for overflowing the lock stack.
> Do you plan to add one?

Sure. They are generally tricky, you usually need to tell the compiler not to do stuff like eliding locks, and inline methods. I will attempt to write tests both for -Xint and the compiler that tests both recursive and normal full lock stack. (The recursive tests requires the platform to implement recursive lightweight for it to effectively test anything)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16606#discussion_r1402998083


More information about the hotspot-dev mailing list