< prev index next >

src/os_cpu/aix_ppc/vm/os_aix_ppc.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


 518   sigthreadmask(SIG_UNBLOCK, &newset, NULL);
 519 
 520   VMError::report_and_die(t, sig, pc, info, ucVoid);
 521 
 522   ShouldNotReachHere();
 523   return 0;
 524 }
 525 
 526 void os::Aix::init_thread_fpu_state(void) {
 527 #if !defined(USE_XLC_BUILTINS)
 528   // Disable FP exceptions.
 529   __asm__ __volatile__ ("mtfsfi 6,0");
 530 #else
 531   __mtfsfi(6, 0);
 532 #endif
 533 }
 534 
 535 ////////////////////////////////////////////////////////////////////////////////
 536 // thread stack
 537 
 538 // These sizes exclude libc stack guard pages, but include
 539 // the HotSpot guard pages.
 540 size_t os::Posix::_compiler_thread_min_stack_allowed = 512 * K;
 541 size_t os::Posix::_java_thread_min_stack_allowed = 512 * K;
 542 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K;
 543 
 544 // Return default stack size for thr_type.
 545 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
 546   // Default stack size (compiler thread needs larger stack).
 547   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
 548   return s;
 549 }
 550 
 551 /////////////////////////////////////////////////////////////////////////////
 552 // helper functions for fatal error handler
 553 
 554 void os::print_context(outputStream *st, const void *context) {
 555   if (context == NULL) return;
 556 
 557   const ucontext_t* uc = (const ucontext_t*)context;
 558 
 559   st->print_cr("Registers:");
 560   st->print("pc =" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.iar);
 561   st->print("lr =" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.lr);
 562   st->print("ctr=" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.ctr);




 518   sigthreadmask(SIG_UNBLOCK, &newset, NULL);
 519 
 520   VMError::report_and_die(t, sig, pc, info, ucVoid);
 521 
 522   ShouldNotReachHere();
 523   return 0;
 524 }
 525 
 526 void os::Aix::init_thread_fpu_state(void) {
 527 #if !defined(USE_XLC_BUILTINS)
 528   // Disable FP exceptions.
 529   __asm__ __volatile__ ("mtfsfi 6,0");
 530 #else
 531   __mtfsfi(6, 0);
 532 #endif
 533 }
 534 
 535 ////////////////////////////////////////////////////////////////////////////////
 536 // thread stack
 537 
 538 // Minimum usable stack sizes required to get to user code. Space for
 539 // HotSpotguard pages is added later.
 540 size_t os::Posix::_compiler_thread_min_stack_allowed = 192 * K;
 541 size_t os::Posix::_java_thread_min_stack_allowed = 64 * K;
 542 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 64 * K;
 543 
 544 // Return default stack size for thr_type.
 545 size_t os::Posix::default_stack_size(os::ThreadType thr_type) {
 546   // Default stack size (compiler thread needs larger stack).
 547   size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M);
 548   return s;
 549 }
 550 
 551 /////////////////////////////////////////////////////////////////////////////
 552 // helper functions for fatal error handler
 553 
 554 void os::print_context(outputStream *st, const void *context) {
 555   if (context == NULL) return;
 556 
 557   const ucontext_t* uc = (const ucontext_t*)context;
 558 
 559   st->print_cr("Registers:");
 560   st->print("pc =" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.iar);
 561   st->print("lr =" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.lr);
 562   st->print("ctr=" INTPTR_FORMAT "  ", uc->uc_mcontext.jmp_context.ctr);


< prev index next >