RFR: 8291555: Implement alternative fast-locking scheme [v21]

Thomas Stuefe stuefe at openjdk.org
Mon Mar 13 10:15:40 UTC 2023


On Sat, 11 Mar 2023 14:53:29 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'origin/JDK-8291555-v2' into JDK-8291555-v2
>>  - Use nullptr instead of NULL in touched code (shared)
>
> src/hotspot/share/runtime/lockStack.hpp line 52:
> 
>> 50:   static ByteSize limit_offset()      { return byte_offset_of(LockStack, _limit); }
>> 51: 
>> 52:   static void ensure_lock_stack_size(oop* _required_limit);
> 
> I would split this, do the comparison inline, only the actual growth in the cpp file.

Just realized that this interface is actually a bit odd: since we pass a wish pointer that has nothing to do with either current state nor final result. In fact, the pointer could at the moment point into the lock stack of a different thread.

So this is "the pointer that would designate the end of the LockStack if the lockstack were enlarged *in-place*". Maybe add a comment like that.

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

PR: https://git.openjdk.org/jdk/pull/10907


More information about the serviceability-dev mailing list