use of jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider in project graal by oracle.
the class MemoryUsageBenchmark method allocSpyCompilation.
@SuppressWarnings("try")
private void allocSpyCompilation(String methodName) {
if (AllocSpy.isEnabled()) {
HotSpotResolvedJavaMethod method = (HotSpotResolvedJavaMethod) getResolvedJavaMethod(methodName);
// invalidate any existing compiled code
method.reprofile();
long jvmciEnv = 0L;
try (AllocSpy as = AllocSpy.open(methodName)) {
HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime();
HotSpotCompilationRequest request = new HotSpotCompilationRequest(method, JVMCICompiler.INVOCATION_ENTRY_BCI, jvmciEnv);
HotSpotGraalCompiler compiler = (HotSpotGraalCompiler) runtime.getCompiler();
OptionValues options = getInitialOptions();
CompilationTask task = new CompilationTask(runtime, compiler, request, true, false, options);
task.runCompilation();
}
}
}
Aggregations