< prev index next >

src/os/posix/vm/os_posix.cpp

Print this page
rev 12363 : 8169373: Work around linux NPTL stack guard error.
Summary: Also skip libc guard page for compiler thread, merge similar code on linux platforms, and streamline libc guard page handling on linuxs390, linuxppc, aixppc.
Reviewed-by: dholmes, dcubed
rev 12364 : imported patch compilerGuardFix.patch

*** 1109,1122 **** // the java system classes, including StackOverflowError - depends on page // size. Add two 4K pages for compiler2 recursion in main thread. // Add in 4*BytesPerWord 4K pages to account for VM stack during // class initialization depending on 32 or 64 bit VM. jint os::Posix::set_minimum_stack_sizes() { ! _java_thread_min_stack_allowed = MAX2(_java_thread_min_stack_allowed, JavaThread::stack_guard_zone_size() + ! JavaThread::stack_shadow_zone_size() + ! (4 * BytesPerWord COMPILER2_PRESENT(+ 2)) * 4 * K); _java_thread_min_stack_allowed = align_size_up(_java_thread_min_stack_allowed, vm_page_size()); size_t stack_size_in_bytes = ThreadStackSize * K; if (stack_size_in_bytes != 0 && --- 1109,1121 ---- // the java system classes, including StackOverflowError - depends on page // size. Add two 4K pages for compiler2 recursion in main thread. // Add in 4*BytesPerWord 4K pages to account for VM stack during // class initialization depending on 32 or 64 bit VM. jint os::Posix::set_minimum_stack_sizes() { ! _java_thread_min_stack_allowed = _java_thread_min_stack_allowed + JavaThread::stack_guard_zone_size() + ! JavaThread::stack_shadow_zone_size(); _java_thread_min_stack_allowed = align_size_up(_java_thread_min_stack_allowed, vm_page_size()); size_t stack_size_in_bytes = ThreadStackSize * K; if (stack_size_in_bytes != 0 &&
*** 1148,1159 **** } #endif // SOLARIS // Make the stack size a multiple of the page size so that // the yellow/red zones can be guarded. ! JavaThread::set_stack_size_at_create(round_to(stack_size_in_bytes, ! vm_page_size())); _compiler_thread_min_stack_allowed = align_size_up(_compiler_thread_min_stack_allowed, vm_page_size()); stack_size_in_bytes = CompilerThreadStackSize * K; if (stack_size_in_bytes != 0 && --- 1147,1161 ---- } #endif // SOLARIS // Make the stack size a multiple of the page size so that // the yellow/red zones can be guarded. ! JavaThread::set_stack_size_at_create(round_to(stack_size_in_bytes, vm_page_size())); ! ! _compiler_thread_min_stack_allowed = _compiler_thread_min_stack_allowed + ! JavaThread::stack_guard_zone_size() + ! JavaThread::stack_shadow_zone_size(); _compiler_thread_min_stack_allowed = align_size_up(_compiler_thread_min_stack_allowed, vm_page_size()); stack_size_in_bytes = CompilerThreadStackSize * K; if (stack_size_in_bytes != 0 &&
< prev index next >