--- old/src/os/bsd/vm/os_bsd.cpp 2015-08-03 01:38:58.113603790 -0400 +++ new/src/os/bsd/vm/os_bsd.cpp 2015-08-03 01:38:56.849531975 -0400 @@ -739,40 +739,35 @@ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - // stack size - if (os::Bsd::supports_variable_stack_size()) { - // calculate stack size if it's not specified by caller - if (stack_size == 0) { - stack_size = os::Bsd::default_stack_size(thr_type); + // calculate stack size if it's not specified by caller + if (stack_size == 0) { + stack_size = os::Bsd::default_stack_size(thr_type); - switch (thr_type) { - case os::java_thread: - // Java threads use ThreadStackSize which default value can be - // changed with the flag -Xss - assert(JavaThread::stack_size_at_create() > 0, "this should be set"); - stack_size = JavaThread::stack_size_at_create(); + switch (thr_type) { + case os::java_thread: + // Java threads use ThreadStackSize which default value can be + // changed with the flag -Xss + assert(JavaThread::stack_size_at_create() > 0, "this should be set"); + stack_size = JavaThread::stack_size_at_create(); + break; + case os::compiler_thread: + if (CompilerThreadStackSize > 0) { + stack_size = (size_t)(CompilerThreadStackSize * K); break; - case os::compiler_thread: - if (CompilerThreadStackSize > 0) { - stack_size = (size_t)(CompilerThreadStackSize * K); - break; - } // else fall through: - // use VMThreadStackSize if CompilerThreadStackSize is not defined - case os::vm_thread: - case os::pgc_thread: - case os::cgc_thread: - case os::watcher_thread: - if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K); - break; - } + } // else fall through: + // use VMThreadStackSize if CompilerThreadStackSize is not defined + case os::vm_thread: + case os::pgc_thread: + case os::cgc_thread: + case os::watcher_thread: + if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K); + break; } - - stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed); - pthread_attr_setstacksize(&attr, stack_size); - } else { - // let pthread_create() pick the default value. } + stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed); + pthread_attr_setstacksize(&attr, stack_size); + ThreadState state; {