RFR: Improve deflating even more
Roman Kennke
rkennke at redhat.com
Tue May 16 21:03:48 UTC 2017
Discussions on hotspot-runtime-dev and code inspection have shown a
problem with the recent monitor deflating change. When allocating object
monitors, and we exceed a certain threshold, ObjectSynchronizer induces
a special empty safepoint that only serves to deflate idle monitors.
However, last changed made that a no-op. We're potentially piling up
idle monitors until next GC safepoint, which can be longish.
Another problem is that most GCs (basically all but Shenandoah at this
point) can't handle per-thread deflation, because they store away mark
words, and abuse them as forwarding pointer. However, for deflation we
need the real mark word.
This patch:
- adds a check for the forced-deflating situation, and deflates monitors
when running into this forced deflation safepoint and for GCs that don't
support per-thread deflation.
- Collapses deflation and oop iteration into one pass, if supported by GC
- Adds some machinery to ask the GC to deflate idle monitors using
multiple GC threads, even for no-GC safepoints
- Adds some GC interfaces to ask the GC if it supports per-thread deflation
http://cr.openjdk.java.net/~rkennke/deflating/webrev.00/
<http://cr.openjdk.java.net/%7Erkennke/deflating/webrev.00/>
Testing: hotspot_gc_shenandoah, jcstress, specjvm
Ok?
More information about the shenandoah-dev
mailing list