Search in sources :

Example 6 with TruffleDebugJavaMethod

use of org.graalvm.compiler.truffle.common.TruffleDebugJavaMethod in project graal by oracle.

the class GraalTruffleRuntime method doCompile.

@SuppressWarnings("try")
protected void doCompile(OptionValues options, OptimizedCallTarget callTarget, Cancellable task) {
    listeners.onCompilationStarted(callTarget);
    TruffleCompiler compiler = getTruffleCompiler();
    TruffleInlining inlining = new TruffleInlining(callTarget, new DefaultInliningPolicy());
    CompilationIdentifier compilationId = compiler.getCompilationIdentifier(callTarget);
    try (DebugContext debug = compilationId != null ? compiler.openDebugContext(options, compilationId, callTarget) : null) {
        try (Scope s = debug != null ? debug.scope("Truffle", new TruffleDebugJavaMethod(callTarget)) : null) {
            maybeDumpTruffleTree(debug, options, callTarget, inlining);
            compiler.doCompile(debug, compilationId, options, callTarget, inlining, task, listeners.isEmpty() ? null : listeners);
        } catch (RuntimeException | Error e) {
            throw e;
        } catch (Throwable e) {
            throw new InternalError(e);
        }
    }
    dequeueInlinedCallSites(inlining, callTarget);
}
Also used : CompilationIdentifier(org.graalvm.compiler.core.common.CompilationIdentifier) TruffleOptionsOverrideScope(org.graalvm.compiler.truffle.common.TruffleCompilerOptions.TruffleOptionsOverrideScope) Scope(org.graalvm.compiler.debug.DebugContext.Scope) TruffleDebugJavaMethod(org.graalvm.compiler.truffle.common.TruffleDebugJavaMethod) GraalError(org.graalvm.compiler.debug.GraalError) ServiceConfigurationError(java.util.ServiceConfigurationError) TruffleCompiler(org.graalvm.compiler.truffle.common.TruffleCompiler) DebugContext(org.graalvm.compiler.debug.DebugContext)

Aggregations

TruffleDebugJavaMethod (org.graalvm.compiler.truffle.common.TruffleDebugJavaMethod)6 DebugContext (org.graalvm.compiler.debug.DebugContext)5 SpeculationLog (jdk.vm.ci.meta.SpeculationLog)3 OptionValues (org.graalvm.compiler.options.OptionValues)3 StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)2 TruffleCompiler (org.graalvm.compiler.truffle.common.TruffleCompiler)2 DefaultInliningPolicy (org.graalvm.compiler.truffle.runtime.DefaultInliningPolicy)2 TruffleInlining (org.graalvm.compiler.truffle.runtime.TruffleInlining)2 LinkedHashMap (java.util.LinkedHashMap)1 ServiceConfigurationError (java.util.ServiceConfigurationError)1 BailoutException (jdk.vm.ci.code.BailoutException)1 CompilationResult (org.graalvm.compiler.code.CompilationResult)1 CompilationPrinter (org.graalvm.compiler.core.CompilationPrinter)1 CancellationBailoutException (org.graalvm.compiler.core.common.CancellationBailoutException)1 CompilationIdentifier (org.graalvm.compiler.core.common.CompilationIdentifier)1 RetryableBailoutException (org.graalvm.compiler.core.common.RetryableBailoutException)1 CompilationAlarm (org.graalvm.compiler.core.common.util.CompilationAlarm)1 DebugCloseable (org.graalvm.compiler.debug.DebugCloseable)1 Scope (org.graalvm.compiler.debug.DebugContext.Scope)1 GraalError (org.graalvm.compiler.debug.GraalError)1