Skip to content

Commit 2445735

Browse files
author
Harold Seigel
committed
8258837: Remove JVM option DisableStartThread
Reviewed-by: kbarrett, dcubed
1 parent a4e082e commit 2445735

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

src/hotspot/share/runtime/globals.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -697,10 +697,6 @@ const intx ObjectAlignmentInBytes = 8;
697697
product(bool, ClassUnloadingWithConcurrentMark, true, \
698698
"Do unloading of classes with a concurrent marking cycle") \
699699
\
700-
develop(bool, DisableStartThread, false, \
701-
"Disable starting of additional Java threads " \
702-
"(for debugging only)") \
703-
\
704700
develop(bool, MemProfiling, false, \
705701
"Write memory usage profiling to log file") \
706702
\
@@ -2079,7 +2075,7 @@ const intx ObjectAlignmentInBytes = 8;
20792075
constraint(InitArrayShortSizeConstraintFunc, AfterErgo) \
20802076
\
20812077
product(ccstr, AllocateHeapAt, NULL, \
2082-
"Path to the directoy where a temporary file will be created " \
2078+
"Path to the directory where a temporary file will be created " \
20832079
"to use as the backing store for Java Heap.") \
20842080
\
20852081
develop(int, VerifyMetaspaceInterval, DEBUG_ONLY(500) NOT_DEBUG(0), \

src/hotspot/share/runtime/thread.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -495,17 +495,15 @@ void Thread::set_priority(Thread* thread, ThreadPriority priority) {
495495
void 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

511509
class 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

Comments
 (0)