RFR: 8256302: releasing oopStorage when deflating allows for faster deleting [v5]
Daniel D. Daugherty
dcubed at openjdk.org
Tue Jun 6 17:28:41 UTC 2023
On Tue, 6 Jun 2023 07:08:32 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> I look at it a little different, I guess. Here in the destructor we check if
>> the object's oop storage has already been released. If it has not, then
>> we do the `release_object()` call. This is like seeing if a buffer has
>> been already freed and taking care of the free if it is still needed. Here
>> I care about the `_object`'s state (and not the thread's state).
>>
>> I don't check the current thread's state here nor do I assert it. Based
>> on my testing, if this destructor is called from an unsafe context and
>> we need to do the `release_object()` call, the we'll fail a sanity check
>> down in the `release_object()` call stack.
>
> Okay it was your "(and safe)" comment that implied to me that `is_null` was somehow also being used to infer the thread's state was safe to do the release.
I add a clarification to my comment above:
Update: s/(and safe)/(and presumed to be safe)/
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/11296#discussion_r1220047271
More information about the hotspot-runtime-dev
mailing list