On Mon, 28 Oct 2024 13:08:37 GMT, Richard Reingruber <rr...@openjdk.org> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with two 
>> additional commits since the last revision:
>> 
>>  - Restore use of atPointA in test StopThreadTest.java
>>  - remove interruptible check from conditional in Object::wait
>
> src/hotspot/share/runtime/objectMonitor.hpp line 202:
> 
>> 200: 
>> 201:   // Used in LM_LEGACY mode to store BasicLock* in case of inflation by 
>> contending thread.
>> 202:   BasicLock* volatile _stack_locker;
> 
> IIUC the new field `_stack_locker` is needed because we cannot store the 
> `BasicLock*` anymore in the `_owner` field as it could be interpreted as a 
> thread id by mistake.
> Wouldn't it be an option to have only odd thread ids? Then we could store the 
> `BasicLock*` in the `_owner` field without loosing the information if it is a 
> `BasicLock*` or a thread id. I think this would reduce complexity quite a 
> bit, woudn't it?

`ObjectMonitor::_owner` would never be `ANONYMOUS_OWNER` with `LM_LEGACY`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1819034645

Reply via email to