RFR: 8256302: releasing oopStorage when deflating allows for faster deleting [v5]

Daniel D. Daugherty dcubed at openjdk.org
Sun Jun 4 14:29:16 UTC 2023


On Tue, 29 Nov 2022 21:17:22 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Daniel D. Daugherty has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision:
>> 
>>  - Merge tag 'jdk-21+25' into JDK-8256302
>>    
>>    Added tag jdk-21+25 for changeset a46b5acc
>>  - Allow ObjectMonitor::_object to be reset to nullptr when it is released which allows the code to be cleaner.
>>  - Merge tag 'jdk-21+23' into JDK-8256302
>>    
>>    Added tag jdk-21+23 for changeset 6d4782bc
>>  - address the easy dholmes and kimbarrett CR comments
>>  - 8256302: releasing oopStorage when deflating allows for faster deleting
>
> src/hotspot/share/runtime/objectMonitor.cpp line 279:
> 
>> 277: 
>> 278: ObjectMonitor::~ObjectMonitor() {
>> 279:   _object.release(_oop_storage);
> 
> Just to be clear, we can't call release here because not all
> `delete monitor` calls happen while the JavaThread is in VM.
> Some happen while the JavaThread is blocked.

Now we use `!_object.is_null()` as a flag to indicate when it is
okay (and safe) to do the release from this location.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/11296#discussion_r1216743308


More information about the hotspot-runtime-dev mailing list