ObjectSynchronizer iterate only in-use monitors?

Roman Kennke rkennke at redhat.com
Thu May 11 07:51:10 UTC 2017


Am 11.05.2017 um 09:44 schrieb Robbin Ehn:
> Hi,
>
> We have actually been discussing this last few days:
>
> https://bugs.openjdk.java.net/browse/JDK-8153224

The bug looks related, but focuses on deflation.

> On 05/10/2017 10:41 PM, Roman Kennke wrote:
>>
>> If you think what I'm doing is sane, this might even be useful for other
>> GCs (although they're probably not as much bound by roots scanning as
>> Shenandoah is).
>
> Sane to me at least. I see no reason why we have the
> "-XX:+MonitorInUseLists" option (assuming always on), is there any
> case when we do not want this?
>
> Let me know how you plan to continue this!

I can change the patch to hook up thread-local in-use-monitor scanning
to Thread::oops_do() and have ObjectSynchronizer::oops_do() only scan
the gOmInUseList. I'd make it conditional on -XX:+MonitorInUseLists, for
consistency and just in case anybody's ever turning this off, or else we
should remove that flag? This change should transparently enable this
for all GCs. I'll also file a new enhancement bug for it. Does that
sound good?

Roman



More information about the hotspot-runtime-dev mailing list