RFR (jdk10): JDK-8180175: ObjectSynchronizer only needs to iterate in-use monitors
Roman Kennke
rkennke at redhat.com
Mon May 15 21:01:07 UTC 2017
Ping?
> Adding gc list.
>
> Thanks!
>
> /Robbin
>
> On 05/11/2017 12:08 PM, Roman Kennke wrote:
>> Hi,
>>
>> ObjectSynchronizer::oops_do() currently iterates all monitor blocks,
>> even free ones. With -XX:+MonitorInUseLists, each thread has its own
>> in-use monitors list, and ObjectSynchronizer has a global gOmInUseList
>> for moribund threads. Iterating over in-use monitors only significantly
>> inmproves scanning time for monitors, because it avoids scanning free
>> blocks, improves caching (no padding, and better chances to have
>> thread-local oops in cache already).
>>
>> Performance-wise it makes a very significant difference (running
>> gc-bench's roots.Sync test, which exaggerates synchronizer usage, with
>> Shenandoah):
>>
>> baseline:
>> S: Thread Roots 37748 us
>> S: Synchronizer Roots 15115 us
>> UR: Thread Roots 24967 us
>> UR: Synchronizer Roots 11906 us
>>
>> patched:
>> S: Thread Roots 40365 us
>> S: Synchronizer Roots 0 us
>> UR: Thread Roots 24459 us
>> UR: Synchronizer Roots 0 us
>>
>> Testing: hotspot_gc, specjvm, jcstress -m quick
>>
>> http://cr.openjdk.java.net/~rkennke/8180175/webrev.00/
>> <http://cr.openjdk.java.net/%7Erkennke/8180175/webrev.00/>
>>
>> Roman
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20170515/94bd1ec0/signature.asc>
More information about the hotspot-gc-dev
mailing list