RFR: 8253064: monitor list simplifications and getting rid of TSM [v5]
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Nov 10 20:48:00 UTC 2020
On Tue, 10 Nov 2020 19:41:23 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>>
>> coleenp CR - refactor common ThreadBlockInVM code block into ObjectSynchronizer::chk_for_block_req().
>
> src/hotspot/share/runtime/monitorDeflationThread.cpp line 92:
>
>> 90: // We wait for GuaranteedSafepointInterval so that
>> 91: // is_async_deflation_needed() is checked at the same interval.
>> 92: ml.wait(GuaranteedSafepointInterval);
>
> I don't like that we add a new global monitor just for the whitebox API.
> Without WB poking this could just a plain sleep.
>
> If we must have this new global monitor there seems be no reason for this to be no safepoint ?
> So ThreadBlockInVM would not be needed if we did safepoint checks instead?
>
> I would either skip WB notification and run the test with a very low GuaranteedSafepointInterval and just set flag and wait a second.
> Or if this is really important use a local semaphore and skip the boolean, each increase on sema would result in a deflation pass.
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.
-------------
PR: https://git.openjdk.java.net/jdk/pull/642
More information about the serviceability-dev
mailing list