Search in sources :

Example 1 with TruffleDebugContextImpl

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

the class TruffleToLibGraalEntryPoints method getDumpChannel.

@TruffleToLibGraal(GetDumpChannel)
@CEntryPoint(name = "Java_org_graalvm_compiler_truffle_runtime_hotspot_libgraal_TruffleToLibGraalCalls_getDumpChannel")
@SuppressWarnings({ "unused", "try" })
public static long getDumpChannel(JNIEnv env, JClass hsClazz, @CEntryPoint.IsolateThreadContext long isolateThreadId, long debugContextHandle) {
    try (JNIMethodScope s = LibGraalUtil.openScope(TruffleToLibGraalEntryPoints.class, GetDumpChannel, env)) {
        TruffleDebugContextImpl debugContext = LibGraalObjectHandles.resolve(debugContextHandle, TruffleDebugContextImpl.class);
        GraphOutput<Void, ?> graphOutput = debugContext.buildOutput(GraphOutput.newBuilder(VoidGraphStructure.INSTANCE));
        return LibGraalObjectHandles.create(graphOutput);
    } catch (Throwable t) {
        JNIExceptionWrapper.throwInHotSpot(env, t);
        return 0;
    }
}
Also used : TruffleDebugContextImpl(org.graalvm.compiler.truffle.compiler.TruffleDebugContextImpl) JNIMethodScope(org.graalvm.jniutils.JNIMethodScope) CEntryPoint(org.graalvm.nativeimage.c.function.CEntryPoint) TruffleToLibGraal(org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal)

Aggregations

TruffleToLibGraal (org.graalvm.compiler.truffle.common.hotspot.libgraal.TruffleToLibGraal)1 TruffleDebugContextImpl (org.graalvm.compiler.truffle.compiler.TruffleDebugContextImpl)1 JNIMethodScope (org.graalvm.jniutils.JNIMethodScope)1 CEntryPoint (org.graalvm.nativeimage.c.function.CEntryPoint)1