--- a/hotspot/src/os/linux/vm/os_linux.cpp Mon Aug 03 11:12:57 2015 +0200
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Mon Aug 03 16:54:08 2015 -0400
@@ -711,38 +711,34 @@
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// stack size
- if (os::Linux::supports_variable_stack_size()) {
- // calculate stack size if it's not specified by caller
- if (stack_size == 0) {
- stack_size = os::Linux::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();
+ // calculate stack size if it's not specified by caller
+ if (stack_size == 0) {
+ stack_size = os::Linux::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();
+ 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::Linux::min_stack_allowed);
- pthread_attr_setstacksize(&attr, stack_size);
- } else {
- // let pthread_create() pick the default value.
- }
+ }
+
+ stack_size = MAX2(stack_size, os::Linux::min_stack_allowed);
+ pthread_attr_setstacksize(&attr, stack_size);
// glibc guard page
pthread_attr_setguardsize(&attr, os::Linux::default_guard_size(thr_type));