RFR (jdk10): JDK-8180175: ObjectSynchronizer only needs to iterate in-use monitors
Robbin Ehn
robbin.ehn at oracle.com
Tue May 16 07:01:36 UTC 2017
On 05/15/2017 11:01 PM, Roman Kennke wrote:
> Ping?
Looks ok, will look good when we can drop MonitorInUseLists branches.
Are you handling the deprecation of MonitorInUseLists when CSR becomes available?
/Robbin (not a 'R'eviewer)
>
>
>> 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
>>>
>>>
>
>
More information about the hotspot-gc-dev
mailing list