RFR: 8256302: releasing oopStorage when deflating allows for faster deleting [v5]
David Holmes
dholmes at openjdk.org
Tue Jun 6 07:18:10 UTC 2023
On Mon, 5 Jun 2023 19:37:30 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> This comment doesn't make sense to me. We are calling release whilst blocked IIUC.
>
> No we are not calling release while blocked. This function (`delete_monitors()`) is
> passed an array of ObjectMonitors to delete (`delete_list`). All of the ObjectMonitors
> on `delete_list` have been deflated which means that `release_object()` has already
> been called for all of these ObjectMonitors.
>
> Since `release_object()` has already been called, the `_obj` field in the WeakHandle
> has been cleared AND `_object.is_null()` will be true so the destructor will skip the
> call to `release_object()`.
Ah that was the missing link. We delete deflated monitors and we release when deflating.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11296#discussion_r1219050262
More information about the hotspot-runtime-dev
mailing list