RFR: Parallelize safepoint cleanup

Roman Kennke rkennke at redhat.com
Thu Jun 29 20:04:18 UTC 2017

Am 29.06.2017 um 21:27 schrieb Robbin Ehn:
> Hi Roman,
> Thanks,
> There seem to be a performance gain vs old just running VM thread
> (again shaky numbers, but an indication):
> Old code with,   MonitorUsedDeflationThreshold=0, 0.003099s, avg of 10
> worsed cleanups 0.0213s
> Do it VM thread, MonitorUsedDeflationThreshold=0, 0.002782s, avg of 10
> worsed cleanups 0.0173s
> I'm assuming that combining deflation and nmethods marking in same
> pass is the reason for this.
> Great!

Yes, that seems likely. Thanks for your patient reviewing and testing! :-)

Also, the real winner (for me) was merging deflation and nmethod marking
into GC pass (as proposed in the very first patch). This parallelizes
much better because the GC can do other (root marking) work in parallel.
Unfortunately, this is currently not possible with OpenJDK GCs, because
they all use preserve_marks() and restore_marks() before/after GC to
store away the mark words... but we need them for deflation. (Shenandoah
doesn't do this, and can thus benefit from this optimization, and I
suppose G1 could do it too -- after all it shouldn't require the object
header for marking, right?)


More information about the hotspot-gc-dev mailing list