< prev index next >

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

Print this page




 351                     compilationEvent.setCompileLevel(config.compilationLevelFullOptimization);
 352                     compilationEvent.setSucceeded(compilation.result != null && installedCode != null);
 353                     compilationEvent.setIsOsr(isOSR);
 354                     compilationEvent.setCodeSize(codeSize);
 355                     compilationEvent.setInlinedBytes(compiledBytecodes);
 356                     compilationEvent.commit();
 357                 }
 358             } catch (Throwable t) {
 359                 return compilation.handleException(t);
 360             }
 361         }
 362     }
 363 
 364     @SuppressWarnings("try")
 365     private void installMethod(DebugContext debug, final CompilationResult compResult) {
 366         final CodeCacheProvider codeCache = jvmciRuntime.getHostJVMCIBackend().getCodeCache();
 367         HotSpotBackend backend = compiler.getGraalRuntime().getHostBackend();
 368         installedCode = null;
 369         Object[] context = {new DebugDumpScope(getIdString(), true), codeCache, getMethod(), compResult};
 370         try (DebugContext.Scope s = debug.scope("CodeInstall", context)) {
 371             installedCode = (HotSpotInstalledCode) backend.createInstalledCode(debug, getRequest().getMethod(), getRequest(), compResult,
 372                             getRequest().getMethod().getSpeculationLog(), null, installAsDefault, context);






 373         } catch (Throwable e) {
 374             throw debug.handle(e);
 375         }
 376     }
 377 
 378     @Override
 379     public String toString() {
 380         return "Compilation[id=" + getId() + ", " + getMethod().format("%H.%n(%p)") + (getEntryBCI() == JVMCICompiler.INVOCATION_ENTRY_BCI ? "" : "@" + getEntryBCI()) + "]";
 381     }
 382 
 383     private HotSpotCompilationRequest getRequest() {
 384         return compilationId.getRequest();
 385     }
 386 }


 351                     compilationEvent.setCompileLevel(config.compilationLevelFullOptimization);
 352                     compilationEvent.setSucceeded(compilation.result != null && installedCode != null);
 353                     compilationEvent.setIsOsr(isOSR);
 354                     compilationEvent.setCodeSize(codeSize);
 355                     compilationEvent.setInlinedBytes(compiledBytecodes);
 356                     compilationEvent.commit();
 357                 }
 358             } catch (Throwable t) {
 359                 return compilation.handleException(t);
 360             }
 361         }
 362     }
 363 
 364     @SuppressWarnings("try")
 365     private void installMethod(DebugContext debug, final CompilationResult compResult) {
 366         final CodeCacheProvider codeCache = jvmciRuntime.getHostJVMCIBackend().getCodeCache();
 367         HotSpotBackend backend = compiler.getGraalRuntime().getHostBackend();
 368         installedCode = null;
 369         Object[] context = {new DebugDumpScope(getIdString(), true), codeCache, getMethod(), compResult};
 370         try (DebugContext.Scope s = debug.scope("CodeInstall", context)) {
 371             HotSpotCompilationRequest request = getRequest();
 372             installedCode = (HotSpotInstalledCode) backend.createInstalledCode(debug,
 373                             request.getMethod(),
 374                             request,
 375                             compResult,
 376                             null,
 377                             installAsDefault,
 378                             context);
 379         } catch (Throwable e) {
 380             throw debug.handle(e);
 381         }
 382     }
 383 
 384     @Override
 385     public String toString() {
 386         return "Compilation[id=" + getId() + ", " + getMethod().format("%H.%n(%p)") + (getEntryBCI() == JVMCICompiler.INVOCATION_ENTRY_BCI ? "" : "@" + getEntryBCI()) + "]";
 387     }
 388 
 389     private HotSpotCompilationRequest getRequest() {
 390         return compilationId.getRequest();
 391     }
 392 }
< prev index next >