Tabnine Logo
BranchProfile
Code IndexAdd Tabnine to your IDE (free)

How to use
BranchProfile
in
com.oracle.truffle.api.utilities

Best Java code snippets using com.oracle.truffle.api.utilities.BranchProfile (Showing top 2 results out of 315)

origin: com.oracle/truffle

public static BranchProfile create() {
  return new BranchProfile();
}
origin: sh286/LuaTruffle

@Override
public void executeVoid(VirtualFrame frame) {
  final boolean condition;
  try {
    condition = conditionNode.executeBoolean(frame);
  } catch (UnexpectedResultException e) {
    // TODO
    throw new UnsupportedOperationException(e);
  }
  if (CompilerDirectives.injectBranchProbability(getBranchProbability(), condition)) {
    if (CompilerDirectives.inInterpreter()) {
      thenCount++;
    }
    thenProfile.enter();
    thenPartNode.executeVoid(frame);
  } else {
    if (CompilerDirectives.inInterpreter()) {
      elseCount++;
    }
    elseProfile.enter();
    elsePartNode.executeVoid(frame);
  }
}
com.oracle.truffle.api.utilitiesBranchProfile

Javadoc

Utility class to speculate on branches to be never visited. If the #enter() method is invoked first the optimized code is invalidated and the branch where #enter() is invoked is enabled for compilation. Otherwise if the #enter() method was never invoked the branch will not get compiled. All BranchProfile instances must be held in final fields for compiler optimizations to take effect.

Most used methods

  • <init>
  • enter

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getContentResolver (Context)
  • startActivity (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Path (java.nio.file)
  • Permission (java.security)
    Legacy security code; do not use.
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim plugins
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