< prev index next >

src/hotspot/share/compiler/compileBroker.cpp

Print this page
rev 47445 : 8171853: Remove Shark compiler

@@ -68,13 +68,10 @@
 #include "runtime/vframe.hpp"
 #endif
 #ifdef COMPILER2
 #include "opto/c2compiler.hpp"
 #endif
-#ifdef SHARK
-#include "shark/sharkCompiler.hpp"
-#endif
 
 #ifdef DTRACE_ENABLED
 
 // Only bother with this argument setup if dtrace is available
 

@@ -529,11 +526,10 @@
 
   // No need to initialize compilation system if we do not use it.
   if (!UseCompiler) {
     return;
   }
-#ifndef SHARK
   // Set the interface to the current compiler(s).
   int c1_count = CompilationPolicy::policy()->compiler_count(CompLevel_simple);
   int c2_count = CompilationPolicy::policy()->compiler_count(CompLevel_full_optimization);
 
 #if INCLUDE_JVMCI

@@ -571,17 +567,10 @@
       _compilers[1] = new C2Compiler();
     }
   }
 #endif // COMPILER2
 
-#else // SHARK
-  int c1_count = 0;
-  int c2_count = 1;
-
-  _compilers[1] = new SharkCompiler();
-#endif // SHARK
-
   // Start the compiler thread(s) and the sweeper thread
   init_compiler_sweeper_threads(c1_count, c2_count);
   // totalTime performance counter is always created as it is required
   // by the implementation of java.lang.management.CompilationMBean.
   {

@@ -772,13 +761,13 @@
 }
 
 
 void CompileBroker::init_compiler_sweeper_threads(int c1_compiler_count, int c2_compiler_count) {
   EXCEPTION_MARK;
-#if !defined(ZERO) && !defined(SHARK)
+#if !defined(ZERO)
   assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?");
-#endif // !ZERO && !SHARK
+#endif // !ZERO
   // Initialize the compilation queue
   if (c2_compiler_count > 0) {
     const char* name = JVMCI_ONLY(UseJVMCICompiler ? "JVMCI compile queue" :) "C2 compile queue";
     _c2_compile_queue  = new CompileQueue(name);
     _compilers[1]->set_num_compiler_threads(c2_compiler_count);

@@ -794,11 +783,11 @@
   const bool compiler_thread = true;
   for (int i = 0; i < c2_compiler_count; i++) {
     // Create a name for our thread.
     sprintf(name_buffer, "%s CompilerThread%d", _compilers[1]->name(), i);
     CompilerCounters* counters = new CompilerCounters();
-    // Shark and C2
+    // C2
     make_thread(name_buffer, _c2_compile_queue, counters, _compilers[1], compiler_thread, CHECK);
   }
 
   for (int i = c2_compiler_count; i < compiler_count; i++) {
     // Create a name for our thread.

@@ -1098,11 +1087,11 @@
     if (method->is_not_osr_compilable(comp_level)) return NULL;
   }
 
   assert(!HAS_PENDING_EXCEPTION, "No exception should be present");
   // some prerequisites that are compiler specific
-  if (comp->is_c2() || comp->is_shark()) {
+  if (comp->is_c2()) {
     method->constants()->resolve_string_constants(CHECK_AND_CLEAR_NULL);
     // Resolve all classes seen in the signature of the method
     // we are compiling.
     Method::load_signature_classes(method, CHECK_AND_CLEAR_NULL);
   }

@@ -1488,15 +1477,13 @@
 
     // Switch back to VM state to do compiler initialization
     ThreadInVMfromNative tv(thread);
     ResetNoHandleMark rnhm;
 
-    if (!comp->is_shark()) {
       // Perform per-thread and global initializations
       comp->initialize();
     }
-  }
 
   if (comp->is_failed()) {
     disable_compilation_forever();
     // If compiler initialization failed, no compiler thread that is specific to a
     // particular compiler runtime will ever start to compile methods.
< prev index next >