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

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


On Tue, 21 Nov 2023 22:22:07 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> 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 six commits:
>> 
>>  - Merge remote-tracking branch 'upstream_jdk/pr/16603' into JDK-8319797
>>  - Merge remote-tracking branch 'upstream_jdk/pr/16603' into JDK-8319797
>>  - Merge remote-tracking branch 'upstream_jdk/pr/16603' into JDK-8319797
>>  - Fix nit
>>  - Fix comment typos
>>  - 8319797: Recursive lightweight locking: Runtime implementation
>
> src/hotspot/share/runtime/lockStack.inline.hpp line 144:
> 
>> 142:   for (int i = 0; i < end; i++) {
>> 143:     if (_base[i] != o) {
>> 144:       _base[inserted++] = _base[i];
> 
> This version of the removal algorithm stores into every `base[inserted]` memory location
> even when `inserted == i` before the first instance of `o` is found and logically removed.
> Granted the lock stack is only 8 elements, but storing into every memory location when
> you don't need to is wasteful.

Done.

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

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


More information about the hotspot-dev mailing list