Loop strip mining to decreases safepoint poll frequency

Roman Kennke rkennke at redhat.com
Tue Feb 28 10:45:20 UTC 2017


Am 28.02.2017 um 11:23 schrieb Roland Westrelin:
> 
> http://cr.openjdk.java.net/~roland/shenandoah/loopstripmining/webrev.00/
> 
> This implements loop strip mining in c2:
> 
> for (..) {
>   // work
>   safepoint poll
> }
> 
> is transformed to:
> 
> for (..) {
>   for (..) {
>     // work
>   }
>   safepoint poll
> }
> 
> so the loop runs for at most LoopStripMiningIter iterations between
> safepoint polls. This patch enables it by default for shenandoah and
> sets LoopStripMiningIter to an arbitrary 1000 iterations. All loop
> optimizations should be preserved. LoopStripMiningIter=0 disables it
> (and it then runs with no safepoints). +UseCountedLoopSafepoints is
> another way to disable it (and it then runs with a safepoint per loop
> iteration).

Great!

The patch looks ok from afar ;-) A lot of this C2 wrestling looks like
voodoo magic... I trust that you have tested it etc.

What's the plan for upstreaming this? Let it bake in Shenandoah for a
while and then go upstream?

Roman



More information about the shenandoah-dev mailing list