ObjectSynchronizer iterate only in-use monitors?
Robbin Ehn
robbin.ehn at oracle.com
Tue May 16 09:45:16 UTC 2017
On 05/16/2017 11:37 AM, Roman Kennke wrote:
> Am 16.05.2017 um 11:24 schrieb Robbin Ehn:
>> Hi,
>>
>> On 05/16/2017 11:13 AM, Roman Kennke wrote:
>>>>>>> http://cr.openjdk.java.net/~rkennke/deflate-per-thread/webrev.01/
>>
>> I only had a quick look, one thing that is troubling is that:
>>
>> SafepointSynchronize::begin() ->
>> SafepointSynchronize::do_cleanup_tasks() ->
>> ObjectSynchronizer::deflate_idle_monitors()
>> no longer actually deflates threads om list, so that
>> ObjectSynchronizer::omAlloc(..) -> InduceScavenge() ->
>> VMThread::execute(new VM_ForceAsyncSafepoint())
>> do not have intended effect?
>
> Good point!
>
> It should be easy to solve though, by checking if (ForceMonitorScavenge)
> in deflate_idle_monitors() and scavenging all monitors in this case.
> Right? It comes with the disadvantage of potentially long-ish pause
> though (esp. when running with many Java threads) -- but not worse than
> it is now.
Yes, but since we are at a safepoint you should be able to use gc worker in that case also?
So I think a more elaborate fix here is to prefer?
/Robbin
>
> Roman
>
More information about the hotspot-runtime-dev
mailing list