src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java	Mon Mar 20 17:38:24 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java	Mon Mar 20 17:38:24 2017

*** 24,36 **** --- 24,34 ---- import static org.graalvm.compiler.debug.internal.MemUseTrackerImpl.getCurrentThreadAllocatedBytes; import org.graalvm.compiler.api.test.Graal; import org.graalvm.compiler.core.test.AllocSpy; import org.graalvm.compiler.debug.Debug; import org.graalvm.compiler.debug.DebugEnvironment; import org.graalvm.compiler.debug.internal.DebugScope; import org.graalvm.compiler.hotspot.CompilationTask; import org.graalvm.compiler.hotspot.CompileTheWorld; import org.graalvm.compiler.hotspot.CompileTheWorldOptions; import org.graalvm.compiler.hotspot.HotSpotGraalCompiler; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
*** 123,135 **** --- 121,131 ---- // Ensure a Graal runtime is initialized prior to Debug being initialized as the former // may include processing command line options used by the latter. Graal.getRuntime(); // Ensure a debug configuration for this thread is initialized if (Debug.isEnabled() && DebugScope.getConfig() == null) { DebugEnvironment.initialize(System.out); } + DebugEnvironment.ensureInitialized(getInitialOptions()); new MemoryUsageBenchmark().run(); } @SuppressWarnings("try") private void doCompilation(String methodName, String label) {
*** 142,152 **** --- 138,148 ---- try (MemoryUsageCloseable c = label == null ? null : new MemoryUsageCloseable(label)) { HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime(); int entryBCI = JVMCICompiler.INVOCATION_ENTRY_BCI; HotSpotCompilationRequest request = new HotSpotCompilationRequest(method, entryBCI, jvmciEnv); ! CompilationTask task = new CompilationTask(runtime, (HotSpotGraalCompiler) runtime.getCompiler(), request, true, false, getInitialOptions()); task.runCompilation(); } } @SuppressWarnings("try")
*** 159,169 **** --- 155,165 ---- long jvmciEnv = 0L; try (AllocSpy as = AllocSpy.open(methodName)) { HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime(); HotSpotCompilationRequest request = new HotSpotCompilationRequest(method, JVMCICompiler.INVOCATION_ENTRY_BCI, jvmciEnv); ! CompilationTask task = new CompilationTask(runtime, (HotSpotGraalCompiler) runtime.getCompiler(), request, true, false, getInitialOptions()); task.runCompilation(); } } }
*** 183,195 **** --- 179,191 ---- } public void run() { compileAndTime("simple"); compileAndTime("complex"); ! if (CompileTheWorldOptions.CompileTheWorldClasspath.getValue(getInitialOptions()) != CompileTheWorld.SUN_BOOT_CLASS_PATH) { HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime(); ! CompileTheWorld ctw = new CompileTheWorld(runtime, (HotSpotGraalCompiler) runtime.getCompiler(), getInitialOptions()); try { ctw.compile(); } catch (Throwable e) { e.printStackTrace(); }

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File