src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.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/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java	Fri Jul  7 09:30:14 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/HotSpotGraalVMEventListener.java	Fri Jul  7 09:30:14 2017

*** 20,40 **** --- 20,41 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package org.graalvm.compiler.hotspot; + import java.util.ArrayList; + import java.util.List; + + import org.graalvm.compiler.code.CompilationResult; + import org.graalvm.compiler.debug.DebugContext; + import org.graalvm.compiler.debug.DebugOptions; + import org.graalvm.compiler.serviceprovider.GraalServices; + import jdk.vm.ci.code.CompiledCode; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider; import jdk.vm.ci.hotspot.HotSpotVMEventListener; import org.graalvm.compiler.code.CompilationResult; import org.graalvm.compiler.debug.Debug; import org.graalvm.compiler.debug.GraalDebugConfig; import org.graalvm.compiler.serviceprovider.GraalServices; import java.util.ArrayList; import java.util.List; public class HotSpotGraalVMEventListener implements HotSpotVMEventListener { private final HotSpotGraalRuntime runtime; private List<HotSpotCodeCacheListener> listeners;
*** 52,77 **** --- 53,79 ---- runtime.shutdown(); } @Override public void notifyInstall(HotSpotCodeCacheProvider codeCache, InstalledCode installedCode, CompiledCode compiledCode) { if (Debug.isDumpEnabled(Debug.BASIC_LEVEL)) { CompilationResult compResult = Debug.contextLookup(CompilationResult.class); + DebugContext debug = DebugContext.forCurrentThread(); + if (debug.isDumpEnabled(DebugContext.BASIC_LEVEL)) { + CompilationResult compResult = debug.contextLookup(CompilationResult.class); assert compResult != null : "can't dump installed code properly without CompilationResult"; ! Debug.dump(Debug.BASIC_LEVEL, installedCode, "After code installation"); ! debug.dump(DebugContext.BASIC_LEVEL, installedCode, "After code installation"); } ! if (Debug.isLogEnabled()) { ! Debug.log("%s", codeCache.disassemble(installedCode)); ! if (debug.isLogEnabled()) { ! debug.log("%s", codeCache.disassemble(installedCode)); } for (HotSpotCodeCacheListener listener : listeners) { listener.notifyInstall(codeCache, installedCode, compiledCode); } } @Override public void notifyBootstrapFinished() { runtime.notifyBootstrapFinished(); ! if (GraalDebugConfig.Options.ClearMetricsAfterBootstrap.getValue(runtime.getOptions())) { ! runtime.clearMeters(); ! runtime.clearMetrics(); } } }

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