< prev index next >
src/hotspot/share/compiler/compileBroker.cpp
Print this page
rev 47445 : 8171853: Remove Shark compiler
*** 68,80 ****
#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
--- 68,77 ----
*** 529,539 ****
// 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
--- 526,535 ----
*** 571,587 ****
_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.
{
--- 567,576 ----
*** 772,784 ****
}
void CompileBroker::init_compiler_sweeper_threads(int c1_compiler_count, int c2_compiler_count) {
EXCEPTION_MARK;
! #if !defined(ZERO) && !defined(SHARK)
assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?");
! #endif // !ZERO && !SHARK
// 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);
--- 761,773 ----
}
void CompileBroker::init_compiler_sweeper_threads(int c1_compiler_count, int c2_compiler_count) {
EXCEPTION_MARK;
! #if !defined(ZERO)
assert(c2_compiler_count > 0 || c1_compiler_count > 0, "No compilers?");
! #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,804 ****
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
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.
--- 783,793 ----
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();
! // 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,1108 ****
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()) {
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);
}
--- 1087,1097 ----
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()) {
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,1502 ****
// 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.
--- 1477,1489 ----
< prev index next >