RFR: 8253064: monitor list simplifications and getting rid of TSM [v5]
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Nov 10 21:07:03 UTC 2020
On Tue, 10 Nov 2020 20:52:15 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> We may still decide to do this fix (even though the _object field is now weak):
>>
>> JDK-8249638 Re-instate idle monitor deflation as part of System.gc()
>> https://bugs.openjdk.java.net/browse/JDK-8249638
>>
>> and if we do, then we'll still need the request mechanism.
>
> So why not use a local semaphore and wait with safepoint check instead?
Sorry my preference is for Monitors instead of semaphores. Let's
take that discussion off this PR and you can explain why you dislike
the Monitor so much and think the local semaphore is the way to go.
>> The baseline code (ObjectSynchronizer::deflate_common_idle_monitors())
>> uses ThreadBlockInVM currently. I don't want to change that as part of
>> this work. If we want to generally change uses of ThreadBlockInVM to
>> something else, then we should do that with a dedicated bug.
>
> Currently there is no issue with ThreadBlockInVM since there is no code inside those scopes.
> This adds code there which assumes the timer will be 'resumed', and logs "resume" when it actually could be going to a safepoint.
So if I narrow the scope around the ThreadBlockInVM, then it would be fine?
{
// Honor block request.
ThreadBlockInVM tbivm(self);
}
I can make that change before I integrate...
-------------
PR: https://git.openjdk.java.net/jdk/pull/642
More information about the serviceability-dev
mailing list