diff src/share/vm/runtime/compilationPolicy.hpp @ 22762:9d78d44d3aac

improved JVMCI support for blocking compilation (GRAAL-1387)
author Doug Simon <doug.simon@oracle.com>
date Fri, 08 Jan 2016 17:30:33 +0100
parents 89152779163c
children 9c0966b935a9
line wrap: on
line diff
--- a/src/share/vm/runtime/compilationPolicy.hpp	Wed Dec 30 17:55:07 2015 +0100
+++ b/src/share/vm/runtime/compilationPolicy.hpp	Fri Jan 08 17:30:33 2016 +0100
@@ -58,6 +58,22 @@
   static void set_policy(CompilationPolicy* policy) { _policy = policy; }
   static CompilationPolicy* policy()                { return _policy; }
 
+#ifdef COMPILERJVMCI
+  /**
+   * If in blocking compilation mode and the JVMCI compiler is in use,
+   * this method selects a blocking task (if any) before a non-blocking
+   * task. In blocking compilation mode, the CompileBroker will make
+   * compilations submitted by a JVMCI compiler thread non-blocking. These
+   * compilations should be scheduled after all blocking compilations
+   * to service non-compiler related compilations sooner and reduce the
+   * chance of such compilations timing out.
+   *
+   * @return the first non-blocking task in compile_queue if there is one otherwise
+   *         the first task in compile_queue
+   */
+  static CompileTask* select_task_blocking_aware(CompileQueue* compile_queue);
+#endif
+
   // Profiling
   elapsedTimer* accumulated_time() { return &_accumulated_time; }
   void print_time() PRODUCT_RETURN;