8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash

Ensure ensure correct initialization of compiler runtime

Reviewed-by: kvn, twisti
This commit is contained in:
Albert Noll 2013-10-10 15:44:12 +02:00
parent 7f46feeee2
commit aef0d74e96
18 changed files with 386 additions and 265 deletions

View file

@ -1454,7 +1454,6 @@ void JavaThread::initialize() {
_interp_only_mode = 0;
_special_runtime_exit_condition = _no_async_condition;
_pending_async_exception = NULL;
_is_compiling = false;
_thread_stat = NULL;
_thread_stat = new ThreadStatistics();
_blocked_on_compilation = false;
@ -1815,7 +1814,8 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
// Call Thread.exit(). We try 3 times in case we got another Thread.stop during
// the execution of the method. If that is not enough, then we don't really care. Thread.stop
// is deprecated anyhow.
{ int count = 3;
if (!is_Compiler_thread()) {
int count = 3;
while (java_lang_Thread::threadGroup(threadObj()) != NULL && (count-- > 0)) {
EXCEPTION_MARK;
JavaValue result(T_VOID);
@ -1828,7 +1828,6 @@ void JavaThread::exit(bool destroy_vm, ExitType exit_type) {
CLEAR_PENDING_EXCEPTION;
}
}
// notify JVMTI
if (JvmtiExport::should_post_thread_life()) {
JvmtiExport::post_thread_end(this);
@ -3239,6 +3238,7 @@ CompilerThread::CompilerThread(CompileQueue* queue, CompilerCounters* counters)
_counters = counters;
_buffer_blob = NULL;
_scanned_nmethod = NULL;
_compiler = NULL;
#ifndef PRODUCT
_ideal_graph_printer = NULL;
@ -3255,6 +3255,7 @@ void CompilerThread::oops_do(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClos
}
}
// ======= Threads ========
// The Threads class links together all active threads, and provides
@ -3275,8 +3276,6 @@ bool Threads::_vm_complete = false;
// All JavaThreads
#define ALL_JAVA_THREADS(X) for (JavaThread* X = _thread_list; X; X = X->next())
void os_stream();
// All JavaThreads + all non-JavaThreads (i.e., every thread in the system)
void Threads::threads_do(ThreadClosure* tc) {
assert_locked_or_safepoint(Threads_lock);