Class BackgroundCompileQueue
java.lang.Object
com.oracle.truffle.runtime.BackgroundCompileQueue
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidflush(EngineData engine) Flushes and cancels all compilations in the queue at the next opportunity.getAllTargets(EngineData engine) Return all call targets currently active or in the queue.getQueuedTargets(EngineData engine) Return call targets waiting in queue.intprotected ThreadFactorynewThreadFactory(String threadNamePrefix, OptimizedCallTarget callTarget) protected voidCalled when a compiler thread becomes idle for more thandelayMillis.voidshutdownAndAwaitTermination(long timeout) Flushes all compilations, shuts the compilation queue down and awaits its termination with the given timeout.submitCompilation(com.oracle.truffle.runtime.BackgroundCompileQueue.Priority priority, OptimizedCallTarget target) submitInitialization(OptimizedCallTarget target, Consumer<CompilationTask> action)
-
Field Details
-
runtime
-
-
Constructor Details
-
BackgroundCompileQueue
-
-
Method Details
-
newThreadFactory
-
submitCompilation
public CompilationTask submitCompilation(com.oracle.truffle.runtime.BackgroundCompileQueue.Priority priority, OptimizedCallTarget target) -
submitInitialization
public CompilationTask submitInitialization(OptimizedCallTarget target, Consumer<CompilationTask> action) -
flush
Flushes and cancels all compilations in the queue at the next opportunity. This also includes currently active compilations. -
getQueueSize
public int getQueueSize() -
getQueuedTargets
Return call targets waiting in queue. This does not include call targets currently being compiled. Ifengineisnull, the call targets for all engines are returned, otherwise only the call targets belonging toenginewill be returned. -
getAllTargets
Return all call targets currently active or in the queue. This does also include all call targets being compiled. This method guarantees that all call targets either active or queued are returned and no targets are missed that are currently about to be compiled. Ifengineisnull, the call targets for all engines are returned, otherwise only the call targets belonging toenginewill be returned. -
shutdownAndAwaitTermination
public void shutdownAndAwaitTermination(long timeout) Flushes all compilations, shuts the compilation queue down and awaits its termination with the given timeout. -
notifyIdleCompilerThread
protected void notifyIdleCompilerThread()Called when a compiler thread becomes idle for more thandelayMillis.
-