< prev index next >

src/os_cpu/linux_s390/vm/os_linux_s390.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


 456   ShouldNotReachHere();
 457   return false;
 458 }
 459 
 460 void os::Linux::init_thread_fpu_state(void) {
 461   // Nothing to do on z/Architecture.
 462 }
 463 
 464 int os::Linux::get_fpu_control_word(void) {
 465   // Nothing to do on z/Architecture.
 466   return 0;
 467 }
 468 
 469 void os::Linux::set_fpu_control_word(int fpu_control) {
 470   // Nothing to do on z/Architecture.
 471 }
 472 
 473 ////////////////////////////////////////////////////////////////////////////////
 474 // thread stack
 475 
 476 // These sizes exclude libc stack guard pages, but include
 477 // the HotSpot guard pages.
 478 size_t os::Posix::_compiler_thread_min_stack_allowed = 128 * K;
 479 size_t os::Posix::_java_thread_min_stack_allowed = 236 * K;
 480 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K;
 481 
 482 // Return default stack size for thr_type.
 483 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
 484   // Default stack size (compiler thread needs larger stack).
 485   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1024 * K);
 486   return s;
 487 }
 488 
 489 /////////////////////////////////////////////////////////////////////////////
 490 // helper functions for fatal error handler
 491 
 492 void os::print_context(outputStream *st, const void *context) {
 493   if (context == NULL) return;
 494 
 495   const ucontext_t* uc = (const ucontext_t*)context;
 496 
 497   st->print_cr("Processor state:");
 498   st->print_cr("----------------");
 499   st->print_cr("        ip = " INTPTR_FORMAT " ", uc->uc_mcontext.psw.addr);
 500   st->print_cr(" proc mask = " INTPTR_FORMAT " ", uc->uc_mcontext.psw.mask);




 456   ShouldNotReachHere();
 457   return false;
 458 }
 459 
 460 void os::Linux::init_thread_fpu_state(void) {
 461   // Nothing to do on z/Architecture.
 462 }
 463 
 464 int os::Linux::get_fpu_control_word(void) {
 465   // Nothing to do on z/Architecture.
 466   return 0;
 467 }
 468 
 469 void os::Linux::set_fpu_control_word(int fpu_control) {
 470   // Nothing to do on z/Architecture.
 471 }
 472 
 473 ////////////////////////////////////////////////////////////////////////////////
 474 // thread stack
 475 
 476 // Minimum usable stack sizes required to get to user code. Space for
 477 // HotSpot guard pages is added later.
 478 size_t os::Posix::_compiler_thread_min_stack_allowed = (52 DEBUG_ONLY(+32)) * K;
 479 size_t os::Posix::_java_thread_min_stack_allowed = (32 DEBUG_ONLY(+8)) * K;
 480 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 32 * K;
 481 
 482 // Return default stack size for thr_type.
 483 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
 484   // Default stack size (compiler thread needs larger stack).
 485   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1024 * K);
 486   return s;
 487 }
 488 
 489 /////////////////////////////////////////////////////////////////////////////
 490 // helper functions for fatal error handler
 491 
 492 void os::print_context(outputStream *st, const void *context) {
 493   if (context == NULL) return;
 494 
 495   const ucontext_t* uc = (const ucontext_t*)context;
 496 
 497   st->print_cr("Processor state:");
 498   st->print_cr("----------------");
 499   st->print_cr("        ip = " INTPTR_FORMAT " ", uc->uc_mcontext.psw.addr);
 500   st->print_cr(" proc mask = " INTPTR_FORMAT " ", uc->uc_mcontext.psw.mask);


< prev index next >