@Override public void collectEnvServices(Set<Object> collectTo, Object languageShared, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(languageShared); Instrumenter instrumenter = instrumentationHandler.forLanguage(info); collectTo.add(instrumenter); AllocationReporter allocationReporter = instrumentationHandler.getAllocationReporter(info); collectTo.add(allocationReporter); }
private static Set<Class<?>> getProvidedTags(Node node) { Objects.requireNonNull(node); RootNode root = node.getRootNode(); if (root == null) { return Collections.emptySet(); } Object sourceVM = InstrumentationHandler.AccessorInstrumentHandler.nodesAccess().getSourceVM(root); if (sourceVM == null) { return Collections.emptySet(); } InstrumentationHandler handler = (InstrumentationHandler) InstrumentationHandler.AccessorInstrumentHandler.engineAccess().getInstrumentationHandler(sourceVM); return handler.getProvidedTags(node); }
@Override public void collectEnvServices(Set<Object> collectTo, Object languageShared, TruffleLanguage<?> language) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(languageShared); Instrumenter instrumenter = instrumentationHandler.forLanguage(language); collectTo.add(instrumenter); AllocationReporter allocationReporter = instrumentationHandler.getAllocationReporter(AccessorInstrumentHandler.langAccess().getLanguageInfo(language)); collectTo.add(allocationReporter); }
private static InstrumentationHandler getHandler(RootNode rootNode) { LanguageInfo info = rootNode.getLanguageInfo(); if (info == null) { return null; } Object languageShared = nodesAccess().getEngineObject(info); if (languageShared == null) { return null; } return (InstrumentationHandler) engineAccess().getInstrumentationHandler(languageShared); }
@Override @CompilerDirectives.TruffleBoundary public void notifyThreadFinished(Object engine, TruffleContext context, Thread thread) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyThreadFinished(context, thread); }
@Override @CompilerDirectives.TruffleBoundary public void notifyThreadStarted(Object engine, TruffleContext context, Thread thread) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyThreadStarted(context, thread); }
@Override public void notifyLanguageContextDisposed(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextDisposed(context, info); }
@Override public void notifyLanguageContextFinalized(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextFinalized(context, info); }
@Override @CompilerDirectives.TruffleBoundary public void notifyContextClosed(Object engine, TruffleContext context) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyContextClosed(context); }
@Override @CompilerDirectives.TruffleBoundary public void notifyContextCreated(Object engine, TruffleContext context) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyContextCreated(context); }
@Override @CompilerDirectives.TruffleBoundary public void notifyThreadFinished(Object engine, TruffleContext context, Thread thread) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyThreadFinished(context, thread); }
@Override @CompilerDirectives.TruffleBoundary public void notifyContextClosed(Object engine, TruffleContext context) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyContextClosed(context); }
@Override @CompilerDirectives.TruffleBoundary public void notifyContextCreated(Object engine, TruffleContext context) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyContextCreated(context); }
private static InstrumentationHandler getHandler(RootNode rootNode) { LanguageInfo info = rootNode.getLanguageInfo(); if (info == null) { return null; } Object languageShared = nodesAccess().getEngineObject(info); if (languageShared == null) { return null; } return (InstrumentationHandler) engineAccess().getInstrumentationHandler(languageShared); }
@Override public void notifyLanguageContextFinalized(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextFinalized(context, info); }
@Override public void notifyLanguageContextInitialized(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextInitialized(context, info); }
@Override public void notifyLanguageContextCreated(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextCreated(context, info); }
@Override @CompilerDirectives.TruffleBoundary public void notifyThreadStarted(Object engine, TruffleContext context, Thread thread) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyThreadStarted(context, thread); }
@Override public void notifyLanguageContextDisposed(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextDisposed(context, info); }
@Override public void notifyLanguageContextCreated(Object engine, TruffleContext context, LanguageInfo info) { InstrumentationHandler instrumentationHandler = (InstrumentationHandler) engineAccess().getInstrumentationHandler(engine); instrumentationHandler.notifyLanguageContextCreated(context, info); }