RFR: 8324881: ObjectSynchronizer::inflate(Thread* current...) is invoked for non-current thread [v3]

Axel Boldt-Christmas aboldtch at openjdk.org
Thu Feb 1 07:03:04 UTC 2024


On Thu, 1 Feb 2024 06:26:51 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Axel Boldt-Christmas has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More restrictive API
>
> src/hotspot/share/runtime/synchronizer.cpp line 1303:
> 
>> 1301:   if (LockingMode == LM_LIGHTWEIGHT && current->is_Java_thread()) {
>> 1302:     return inflate_for(JavaThread::cast(current), obj, cause);
>> 1303:   }
> 
> Not quite what I had in mind. I expected the deopt code to call `inflate_for` to make it clear it was a different kind of inflation request.

I think you are correct that it is more clear that way. Will combine this feedback with @coleenp feedback about have the inflate_impl just take the JavaThread* for LM_LIGHTWEIGHT.

Just need to figure out a parameter name. Might just call it `thread` and add a comment explaining it is something only used by the LM_LIGHTWEIGHT lockingmode.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17626#discussion_r1473882480


More information about the hotspot-dev mailing list