RFR: 8263896: Remove not_suspended parameter from ObjectMonitor::exit()
patricio.chilano.mateo at oracle.com
patricio.chilano.mateo at oracle.com
Tue Mar 23 06:11:46 UTC 2021
Hi David,
On 3/23/21 12:08 AM, David Holmes wrote:
> Hi Patricio,
>
> I'm in two-minds about using incidental state to infer whether to store the last_owner_tid here. Someone might reasonably argue that we should actually be clearing the pending-monitor field whilst in the self-suspend loop.
Right, but having _current_pending_monitor != NULL when calling exit()
can only happen if we are releasing the monitor from enter(), which we
only do in case we were suspended, so both things go hand in hand. If we
want to clear _current_pending_monitor while being suspended we can do
it after the exit() call though and before calling java_suspend_self().
> Is this going to feed into Robbin's thread suspension changes? Otherwise I'm not really seeing the motivation.
Not really. It's just to avoid having to declare exit() with this extra
parameter that's only used for a special case that we can already
detect. It seems wrong to have the user calling exit() figure out what
this value should be.
Alternatively since your cleanup in 8262910, I could move it to the end
of the parameter list and set a default value of true. Then only pass it
explicitly as false for this call. (although I would prefer removing it
altogether and just use _current_pending_monitor : ) ).
Thanks,
Patricio
> Thanks,
> David
>
> -------------
>
> PR: https://git.openjdk.java.net/jdk/pull/3101
More information about the hotspot-runtime-dev
mailing list