RFR(XS): 8196294: LoopStripMiningIterShortLoop is set to zero by default

Tobias Hartmann tobias.hartmann at oracle.com
Tue Mar 20 12:29:37 UTC 2018


Hi Roland,

Looks a bit overly complicated. I would just go with something like this:

/*
 * @test
 * @bug 8196294
 * @summary when loop strip is enabled, LoopStripMiningIterShortLoop should be not null
 * @library /test/lib /
 * @build sun.hotspot.WhiteBox
 * @run driver ClassFileInstaller sun.hotspot.WhiteBox sun.hotspot.WhiteBox$WhiteBoxPermission
 * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
 *                   -XX:+UseG1GC compiler.loopstripmining.CheckLoopStripMiningIterShortLoop
 */

package compiler.loopstripmining;

import sun.hotspot.WhiteBox;

public class CheckLoopStripMiningIterShortLoop {
    private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox();

    public static void main(String[] args) throws Exception {
        long iterShort = WhiteBox.getWhiteBox().getUintxVMFlag("LoopStripMiningIterShortLoop");
        if (iterShort <= 0) {
            throw new RuntimeException("LoopStripMiningIterShortLoop is not set");
        }
    }
}


Best regards,
Tobias

On 20.03.2018 13:20, Roland Westrelin wrote:
> 
> Hi Tobias,
> 
>> looks good to me but I would prefer using the 'getUintxVMFlag' WhitBox API method in the test (see
>> test/lib/sun/hotspot/WhiteBox.java).
> 
> Thanks for looking at this.
> What about:
> 
> http://cr.openjdk.java.net/~roland/8196294/webrev.02/
> 
> ?
> 
> Roland.
> 


More information about the hotspot-compiler-dev mailing list