Search in sources :

Example 6 with LibGraalScope

use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.

the class IgvSupport method create.

static IgvSupport create(LibGraalHotSpotTruffleCompiler compiler, Map<String, Object> options, LibGraalTruffleCompilation compilation) {
    byte[] encodedOptions = OptionsEncoder.encode(options);
    LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE);
    return new IgvSupport(scope, compiler, TruffleToLibGraalCalls.openDebugContext(getIsolateThread(), compiler.handle(options, compilation), compilation == null ? 0 : compilation.getHandle(), encodedOptions));
}
Also used : LibGraalScope(org.graalvm.libgraal.LibGraalScope)

Example 7 with LibGraalScope

use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.

the class LibGraalHotSpotTruffleCompiler method installTruffleCallBoundaryMethod.

@Override
@SuppressWarnings("try")
public void installTruffleCallBoundaryMethod(ResolvedJavaMethod method) {
    try (LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE)) {
        Map<String, Object> options = previousOptions;
        assert options != null : "truffle compiler was never initialized";
        TruffleToLibGraalCalls.installTruffleCallBoundaryMethod(getIsolateThread(), handle(options, null), LibGraal.translate(method));
    }
}
Also used : LibGraalScope(org.graalvm.libgraal.LibGraalScope) LibGraalObject(org.graalvm.libgraal.LibGraalObject)

Example 8 with LibGraalScope

use of org.graalvm.libgraal.LibGraalScope in project graal by oracle.

the class LibGraalHotSpotTruffleCompiler method openCompilation.

@Override
public TruffleCompilation openCompilation(CompilableTruffleAST compilable) {
    LibGraalScope scope = new LibGraalScope(LibGraalScope.DetachAction.DETACH_RUNTIME_AND_RELEASE);
    long compilationHandle = TruffleToLibGraalCalls.openCompilation(getIsolateThread(), handle(optionsEncoder(compilable), compilable, false), compilable);
    LibGraalTruffleCompilation compilation = new LibGraalTruffleCompilation(this, compilationHandle, scope);
    activeCompilation.set(compilation);
    return compilation;
}
Also used : LibGraalScope(org.graalvm.libgraal.LibGraalScope)

Aggregations

LibGraalScope (org.graalvm.libgraal.LibGraalScope)8 LinkedHashMap (java.util.LinkedHashMap)3 ArrayList (java.util.ArrayList)2 LibGraalObject (org.graalvm.libgraal.LibGraalObject)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Attribute (javax.management.Attribute)1 AttributeList (javax.management.AttributeList)1 InstanceAlreadyExistsException (javax.management.InstanceAlreadyExistsException)1 MBeanAttributeInfo (javax.management.MBeanAttributeInfo)1 MBeanException (javax.management.MBeanException)1 MBeanInfo (javax.management.MBeanInfo)1 MBeanOperationInfo (javax.management.MBeanOperationInfo)1 MBeanRegistrationException (javax.management.MBeanRegistrationException)1 MalformedObjectNameException (javax.management.MalformedObjectNameException)1 NotCompliantMBeanException (javax.management.NotCompliantMBeanException)1 ObjectName (javax.management.ObjectName)1