6958292: C1: Enable parallel compilation

Enable parallel compilation in C1

Reviewed-by: never, kvn
This commit is contained in:
Igor Veresov 2010-06-04 11:18:04 -07:00
parent 36f8c82970
commit 00b75f8353
30 changed files with 328 additions and 344 deletions

View file

@ -82,9 +82,6 @@ Mutex* EvacFailureStack_lock = NULL;
Mutex* DerivedPointerTableGC_lock = NULL;
Mutex* Compile_lock = NULL;
Monitor* MethodCompileQueue_lock = NULL;
#ifdef TIERED
Monitor* C1_lock = NULL;
#endif // TIERED
Monitor* CompileThread_lock = NULL;
Mutex* CompileTaskAlloc_lock = NULL;
Mutex* CompileStatistics_lock = NULL;
@ -255,11 +252,6 @@ void mutex_init() {
def(Debug3_lock , Mutex , nonleaf+4, true );
def(ProfileVM_lock , Monitor, nonleaf+4, false); // used for profiling of the VMThread
def(CompileThread_lock , Monitor, nonleaf+5, false );
#ifdef TIERED
def(C1_lock , Monitor, nonleaf+5, false );
#endif // TIERED
}
GCMutexLocker::GCMutexLocker(Monitor * mutex) {

View file

@ -84,9 +84,6 @@ extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare)
extern Mutex* EvacFailureStack_lock; // guards the evac failure scan stack
extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued
#ifdef TIERED
extern Monitor* C1_lock; // a lock to ensure on single c1 compile is ever active
#endif // TIERED
extern Monitor* CompileThread_lock; // a lock held by compile threads during compilation system initialization
extern Mutex* CompileTaskAlloc_lock; // a lock held when CompileTasks are allocated
extern Mutex* CompileStatistics_lock; // a lock held when updating compilation statistics

View file

@ -2797,6 +2797,7 @@ CompilerThread::CompilerThread(CompileQueue* queue, CompilerCounters* counters)
_task = NULL;
_queue = queue;
_counters = counters;
_buffer_blob = NULL;
#ifndef PRODUCT
_ideal_graph_printer = NULL;

View file

@ -1576,6 +1576,7 @@ class CompilerThread : public JavaThread {
CompileLog* _log;
CompileTask* _task;
CompileQueue* _queue;
BufferBlob* _buffer_blob;
public:
@ -1594,6 +1595,9 @@ class CompilerThread : public JavaThread {
ciEnv* env() { return _env; }
void set_env(ciEnv* env) { _env = env; }
BufferBlob* get_buffer_blob() { return _buffer_blob; }
void set_buffer_blob(BufferBlob* b) { _buffer_blob = b; };
// Get/set the thread's logging information
CompileLog* log() { return _log; }
void init_log(CompileLog* log) {