use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class CompileTheWorld method main.
public static void main(String[] args) throws Throwable {
HotSpotJVMCIRuntime jvmciRuntime = HotSpotJVMCIRuntime.runtime();
HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) jvmciRuntime.getCompiler();
HotSpotGraalRuntimeProvider graalRuntime = compiler.getGraalRuntime();
HotSpotCodeCacheProvider codeCache = graalRuntime.getHostProviders().getCodeCache();
OptionValues options = loadOptions(graalRuntime.getOptions());
int iterations = Options.Iterations.getValue(options);
for (int i = 0; i < iterations; i++) {
codeCache.resetCompilationStatistics();
TTY.println("CompileTheWorld : iteration " + i);
CompileTheWorld ctw = new CompileTheWorld(jvmciRuntime, compiler, options);
ctw.compile();
}
// This is required as non-daemon threads can be started by class initializers
System.exit(0);
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class CompileTheWorldTest method testJDK.
@Test
public void testJDK() throws Throwable {
ExceptionAction originalBailoutAction = CompilationBailoutAction.getValue(getInitialOptions());
ExceptionAction originalFailureAction = CompilationFailureAction.getValue(getInitialOptions());
// Compile a couple classes in rt.jar
HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime();
System.setProperty("CompileTheWorld.LimitModules", "java.base");
OptionValues initialOptions = getInitialOptions();
EconomicMap<OptionKey<?>, Object> compilationOptions = CompileTheWorld.parseOptions("Inline=false");
new CompileTheWorld(runtime, (HotSpotGraalCompiler) runtime.getCompiler(), CompileTheWorld.SUN_BOOT_CLASS_PATH, 1, 5, null, null, false, initialOptions, compilationOptions).compile();
assert CompilationBailoutAction.getValue(initialOptions) == originalBailoutAction;
assert CompilationFailureAction.getValue(initialOptions) == originalFailureAction;
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSROuterInnerCompileRestOfMethod.
@Test
@SuppressWarnings("try")
public void testLockOSROuterInnerCompileRestOfMethod() {
run(() -> {
OptionValues options = new OptionValues(getInitialOptions(), osrLockNoDeopt());
testOSR(options, "testOuterInnerLockCompileRestOfMethod");
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSROuterCompileRestOfMethod.
@Test
@SuppressWarnings("try")
public void testLockOSROuterCompileRestOfMethod() {
run(() -> {
EconomicMap<OptionKey<?>, Object> overrides = osrLockNoDeopt();
overrides.put(HighTier.Options.Inline, false);
OptionValues options = new OptionValues(getInitialOptions(), overrides);
testOSR(options, "testOuterLockCompileRestOfMethod");
});
}
use of org.graalvm.compiler.options.OptionValues in project graal by oracle.
the class GraalOSRLockTest method testLockOSROuterInnerLockDepthCompileRestOfMethod.
@Test
@SuppressWarnings("try")
public void testLockOSROuterInnerLockDepthCompileRestOfMethod() {
run(() -> {
EconomicMap<OptionKey<?>, Object> overrides = osrLockNoDeopt();
overrides.put(HighTier.Options.Inline, false);
OptionValues options = new OptionValues(getInitialOptions(), overrides);
testOSR(options, "testOuterInnerLockDepth1CompileRestOfMethod");
});
}
Aggregations