Class BackgroundCompileQueue

java.lang.Object
com.oracle.truffle.runtime.BackgroundCompileQueue

public class BackgroundCompileQueue extends Object
The compilation queue accepts compilation requests, and schedules compilations. The current queuing policy is to first schedule all the first tier compilation requests, and only handle second tier compilation requests when there are no first tier compilations left. Between the compilation requests of the same optimization tier, the queuing policy is FIFO (first-in-first-out). Note that all the compilation requests are second tier when the multi-tier option is turned off.
  • Field Details

  • Constructor Details

  • Method Details

    • newThreadFactory

      protected ThreadFactory newThreadFactory(String threadNamePrefix, OptimizedCallTarget callTarget)
    • submitCompilation

      public CompilationTask submitCompilation(com.oracle.truffle.runtime.BackgroundCompileQueue.Priority priority, OptimizedCallTarget target)
    • submitInitialization

      public CompilationTask submitInitialization(OptimizedCallTarget target, Consumer<CompilationTask> action)
    • getQueueSize

      public int getQueueSize()
    • getQueuedTargets

      public Collection<OptimizedCallTarget> getQueuedTargets(EngineData engine)
      Return call targets waiting in queue. This does not include call targets currently being compiled. If engine is null, the call targets for all engines are returned, otherwise only the call targets belonging to engine will be returned.
    • shutdownAndAwaitTermination

      public void shutdownAndAwaitTermination(long timeout)
    • notifyIdleCompilerThread

      protected void notifyIdleCompilerThread()
      Called when a compiler thread becomes idle for more than delayMillis.