RFR: 8256302: releasing oopStorage when deflating allows for faster deleting

Coleen Phillimore coleenp at openjdk.org
Mon Nov 28 22:57:48 UTC 2022


On Wed, 23 Nov 2022 15:20:42 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> This also made me wonder ... are we guaranteed the current thread is a JavaThread? If so the signature and use of `ObjectSynchronizer::inflate(Thread* current` could be changed. If not, isn't that a requirements for oop storage changes?
>
> We can only release if the current thread is in VM, since we to call the destructor from blocked we can't release there.
> But we can have an assert that WH is null, i.e. `~OM() { assert(_object.is_null(), "Missed one"); }`.

If JavaThread:
ThreadBlockInVM tbivm(JavaThread::cast(current));
  delete delete_list items;

Isn't the thread in the vm?

I wandered into this PR and am trying to understand why the release is moved out of the destructor also.

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

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


More information about the hotspot-runtime-dev mailing list