--- a/src/hotspot/share/runtime/compilationPolicy.cpp Thu Mar 07 00:23:45 2019 +0100
+++ b/src/hotspot/share/runtime/compilationPolicy.cpp Thu Mar 07 08:38:16 2019 +0100
@@ -176,6 +176,14 @@
}
CompileTask* CompilationPolicy::select_task_helper(CompileQueue* compile_queue) {
+ // Remove unloaded methods from the queue
+ for (CompileTask* task = compile_queue->first(); task != NULL; ) {
+ CompileTask* next = task->next();
+ if (task->is_unloaded()) {
+ compile_queue->remove_and_mark_stale(task);
+ }
+ task = next;
+ }
#if INCLUDE_JVMCI
if (UseJVMCICompiler && !BackgroundCompilation) {
/*