Tabnine Logo
com.oracle.truffle.api.instrumentation
Code IndexAdd Tabnine to your IDE (free)

How to use com.oracle.truffle.api.instrumentation

Best Java code snippets using com.oracle.truffle.api.instrumentation (Showing top 20 results out of 315)

origin: com.oracle.truffle/truffle-api

@SuppressWarnings("deprecation")
private static void invalidateWrapperImpl(com.oracle.truffle.api.instrumentation.InstrumentableFactory.WrapperNode parent, Node node) {
  ProbeNode probeNode = parent.getProbeNode();
  if (TRACE) {
    SourceSection section = probeNode.getContext().getInstrumentedSourceSection();
    trace("Invalidate wrapper for %s, section %s %n", node, section);
  }
  if (probeNode != null) {
    probeNode.invalidate();
  }
}
origin: com.oracle.truffle/truffle-api

@Override
public <T extends LoadSourceListener> EventBinding<T> attachLoadSourceListener(SourceFilter filter, T listener, boolean notifyLoaded) {
  SourceSectionFilter sectionsFilter = SourceSectionFilter.newBuilder().sourceFilter(filter).build();
  return attachLoadSourceListener(sectionsFilter, listener, notifyLoaded);
}
origin: org.graalvm.truffle/truffle-api

void create(String[] expectedServices) {
  if (TRACE) {
    trace("Create instrument %s class %s %n", instrument, instrumentClass);
  }
  services = env.onCreate(instrument);
  if (expectedServices != null && !TruffleOptions.AOT) {
    checkServices(expectedServices);
  }
  if (TRACE) {
    trace("Created instrument %s class %s %n", instrument, instrumentClass);
  }
}
origin: com.oracle.truffle/truffle-api

private static void notifySourceBindingLoaded(EventBinding.Source<?> binding, Source source) {
  if (!binding.isDisposed() && binding.isInstrumentedSource(source)) {
    try {
      ((LoadSourceListener) binding.getElement()).onLoad(new LoadSourceEvent(source));
    } catch (Throwable t) {
      if (binding.isLanguageBinding()) {
        throw t;
      } else {
        ProbeNode.exceptionEventForClientInstrument(binding, "onLoad", t);
      }
    }
  }
}
origin: com.oracle.truffle/truffle-api

private static void notifySourceExecutedBinding(EventBinding.Source<?> binding, Source source) {
  if (!binding.isDisposed() && binding.isInstrumentedSource(source)) {
    try {
      ((ExecuteSourceListener) binding.getElement()).onExecute(new ExecuteSourceEvent(source));
    } catch (Throwable t) {
      if (binding.isLanguageBinding()) {
        throw t;
      } else {
        ProbeNode.exceptionEventForClientInstrument(binding, "onExecute", t);
      }
    }
  }
}
origin: org.graalvm.truffle/truffle-api

private void notifyLanguageContextDisposed(TruffleContext context, LanguageInfo language) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onLanguageContextDisposed(context, language);
  }
}
origin: org.graalvm.truffle/truffle-api

@Override
public void onLoad(RootNode rootNode) {
  InstrumentationHandler handler = getHandler(rootNode);
  if (handler != null) {
    handler.onLoad(rootNode);
  }
}
origin: com.oracle.truffle/truffle-api

private void notifyLanguageContextFinalized(TruffleContext context, LanguageInfo language) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onLanguageContextFinalized(context, language);
  }
}
origin: com.oracle.truffle/truffle-api

/**
 * Should get invoked before the node is invoked.
 *
 * @param frame the current frame of the execution.
 * @since 0.12
 */
public void onEnter(VirtualFrame frame) {
  EventChainNode localChain = lazyUpdate(frame);
  if (localChain != null) {
    localChain.onEnter(context, frame);
  }
}
origin: com.oracle.truffle/truffle-api

private void notifyContextClosed(TruffleContext context) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onContextClosed(context);
  }
}
origin: com.oracle.truffle/truffle-api

void onInputValue(VirtualFrame frame, EventBinding<?> targetBinding, EventContext inputContext, int inputIndex, Object inputValue) {
  EventChainNode localChain = lazyUpdate(frame);
  if (localChain != null) {
    localChain.onInputValue(context, frame, targetBinding, inputContext, inputIndex, inputValue);
  }
}
origin: com.oracle.truffle/truffle-api

@Override
public void onFirstExecution(RootNode rootNode) {
  InstrumentationHandler handler = getHandler(rootNode);
  if (handler != null) {
    handler.onFirstExecution(rootNode);
  }
}
origin: org.graalvm.truffle/truffle-api

private void notifyContextCreated(TruffleContext context) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onContextCreated(context);
  }
}
origin: org.graalvm.truffle/truffle-api

private void notifyLanguageContextCreated(TruffleContext context, LanguageInfo language) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onLanguageContextCreated(context, language);
  }
}
origin: org.graalvm.truffle/truffle-api

private static void notifySourceBindingLoaded(EventBinding.Source<?> binding, Source source) {
  if (!binding.isDisposed() && binding.isInstrumentedSource(source)) {
    try {
      ((LoadSourceListener) binding.getElement()).onLoad(new LoadSourceEvent(source));
    } catch (Throwable t) {
      if (binding.isLanguageBinding()) {
        throw t;
      } else {
        ProbeNode.exceptionEventForClientInstrument(binding, "onLoad", t);
      }
    }
  }
}
origin: org.graalvm.truffle/truffle-api

@SuppressWarnings("deprecation")
private static void invalidateWrapperImpl(com.oracle.truffle.api.instrumentation.InstrumentableFactory.WrapperNode parent, Node node) {
  ProbeNode probeNode = parent.getProbeNode();
  if (TRACE) {
    SourceSection section = probeNode.getContext().getInstrumentedSourceSection();
    trace("Invalidate wrapper for %s, section %s %n", node, section);
  }
  if (probeNode != null) {
    probeNode.invalidate();
  }
}
origin: org.graalvm.truffle/truffle-api

@Override
public <T extends LoadSourceListener> EventBinding<T> attachLoadSourceListener(SourceFilter filter, T listener, boolean notifyLoaded) {
  SourceSectionFilter sectionsFilter = SourceSectionFilter.newBuilder().sourceFilter(filter).build();
  return attachLoadSourceListener(sectionsFilter, listener, notifyLoaded);
}
origin: com.oracle.truffle/truffle-api

private void notifyLanguageContextDisposed(TruffleContext context, LanguageInfo language) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onLanguageContextDisposed(context, language);
  }
}
origin: com.oracle.truffle/truffle-api

@Override
public void onLoad(RootNode rootNode) {
  InstrumentationHandler handler = getHandler(rootNode);
  if (handler != null) {
    handler.onLoad(rootNode);
  }
}
origin: org.graalvm.truffle/truffle-api

private void notifyLanguageContextFinalized(TruffleContext context, LanguageInfo language) {
  for (EventBinding<? extends ContextsListener> binding : contextsBindings) {
    binding.getElement().onLanguageContextFinalized(context, language);
  }
}
com.oracle.truffle.api.instrumentation

Most used classes

  • Instrumenter
    Provides capabilities to attach listeners for execution, load, output and allocation events. The ins
  • TruffleInstrument$Env
    Access to instrumentation services as well as input, output, and error streams.
  • TruffleInstrument$Registration
  • EventBinding
    An Instrumenter handle for a subscription to a SourceSectionFilter stream of execution event notific
  • EventContext
    Represents the context of an execution event. Instances of EventContext should be neither stored, ca
  • SourceSectionFilter,
  • AllocationEvent,
  • InstrumentableNode$WrapperNode,
  • ProbeNode,
  • ProvidedTags,
  • AllocationEventFilter$Builder,
  • AllocationEventFilter,
  • AllocationListener,
  • AllocationReporter,
  • ContextsListener,
  • DefaultNearestNodeSearch,
  • EventBinding$Allocation,
  • EventBinding$Source,
  • ExecuteSourceEvent
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now