@@ -495,17 +495,15 @@ void Thread::set_priority(Thread* thread, ThreadPriority priority) {
495495void Thread::start (Thread* thread) {
496496 // Start is different from resume in that its safety is guaranteed by context or
497497 // being called from a Java method synchronized on the Thread object.
498- if (!DisableStartThread) {
499- if (thread->is_Java_thread ()) {
500- // Initialize the thread state to RUNNABLE before starting this thread.
501- // Can not set it after the thread started because we do not know the
502- // exact thread state at that time. It could be in MONITOR_WAIT or
503- // in SLEEPING or some other state.
504- java_lang_Thread::set_thread_status (thread->as_Java_thread ()->threadObj (),
505- JavaThreadStatus::RUNNABLE);
506- }
507- os::start_thread (thread);
498+ if (thread->is_Java_thread ()) {
499+ // Initialize the thread state to RUNNABLE before starting this thread.
500+ // Can not set it after the thread started because we do not know the
501+ // exact thread state at that time. It could be in MONITOR_WAIT or
502+ // in SLEEPING or some other state.
503+ java_lang_Thread::set_thread_status (thread->as_Java_thread ()->threadObj (),
504+ JavaThreadStatus::RUNNABLE);
508505 }
506+ os::start_thread (thread);
509507}
510508
511509class InstallAsyncExceptionClosure : public HandshakeClosure {
@@ -1230,9 +1228,7 @@ WatcherThread::WatcherThread() : NonJavaThread() {
12301228 // If the VMThread's priority is not lower than the WatcherThread profiling
12311229 // will be inaccurate.
12321230 os::set_priority (this , MaxPriority);
1233- if (!DisableStartThread) {
1234- os::start_thread (this );
1235- }
1231+ os::start_thread (this );
12361232 }
12371233}
12381234
0 commit comments