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 hotspot Cdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/MemoryUsageBenchmark.java

Print this page

        

*** 24,36 **** 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; --- 24,34 ----
*** 123,135 **** // 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); ! } new MemoryUsageBenchmark().run(); } @SuppressWarnings("try") private void doCompilation(String methodName, String label) { --- 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 ! DebugEnvironment.ensureInitialized(getInitialOptions()); new MemoryUsageBenchmark().run(); } @SuppressWarnings("try") private void doCompilation(String methodName, String label) {
*** 142,152 **** 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); task.runCompilation(); } } @SuppressWarnings("try") --- 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 **** 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); task.runCompilation(); } } } --- 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 **** } public void run() { compileAndTime("simple"); compileAndTime("complex"); ! if (CompileTheWorldOptions.CompileTheWorldClasspath.getValue() != CompileTheWorld.SUN_BOOT_CLASS_PATH) { HotSpotJVMCIRuntimeProvider runtime = HotSpotJVMCIRuntime.runtime(); ! CompileTheWorld ctw = new CompileTheWorld(runtime, (HotSpotGraalCompiler) runtime.getCompiler()); try { ctw.compile(); } catch (Throwable e) { e.printStackTrace(); } --- 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