Search in sources :

Example 1 with HotSpotJVMCIRuntime

use of jdk.vm.ci.hotspot.HotSpotJVMCIRuntime 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);
}
Also used : HotSpotGraalCompiler(org.graalvm.compiler.hotspot.HotSpotGraalCompiler) HotSpotCodeCacheProvider(jdk.vm.ci.hotspot.HotSpotCodeCacheProvider) OptionValues(org.graalvm.compiler.options.OptionValues) HotSpotJVMCIRuntime(jdk.vm.ci.hotspot.HotSpotJVMCIRuntime) HotSpotGraalRuntimeProvider(org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider) Print(org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.Print)

Aggregations

HotSpotCodeCacheProvider (jdk.vm.ci.hotspot.HotSpotCodeCacheProvider)1 HotSpotJVMCIRuntime (jdk.vm.ci.hotspot.HotSpotJVMCIRuntime)1 Print (org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.Print)1 HotSpotGraalCompiler (org.graalvm.compiler.hotspot.HotSpotGraalCompiler)1 HotSpotGraalRuntimeProvider (org.graalvm.compiler.hotspot.HotSpotGraalRuntimeProvider)1 OptionValues (org.graalvm.compiler.options.OptionValues)1