hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
changeset 18945 1225c36dacd3
parent 18943 7d0ef675e808
parent 18740 db44b1599483
child 20279 7ffa08fef52a
equal deleted inserted replaced
18943:7d0ef675e808 18945:1225c36dacd3
   207 // From IA32 System Programming Guide
   207 // From IA32 System Programming Guide
   208 enum {
   208 enum {
   209   trap_page_fault = 0xE
   209   trap_page_fault = 0xE
   210 };
   210 };
   211 
   211 
   212 extern "C" void Fetch32PFI () ;
       
   213 extern "C" void Fetch32Resume () ;
       
   214 #ifdef AMD64
       
   215 extern "C" void FetchNPFI () ;
       
   216 extern "C" void FetchNResume () ;
       
   217 #endif // AMD64
       
   218 
       
   219 extern "C" JNIEXPORT int
   212 extern "C" JNIEXPORT int
   220 JVM_handle_linux_signal(int sig,
   213 JVM_handle_linux_signal(int sig,
   221                         siginfo_t* info,
   214                         siginfo_t* info,
   222                         void* ucVoid,
   215                         void* ucVoid,
   223                         int abort_if_unrecognized) {
   216                         int abort_if_unrecognized) {
   280 
   273 
   281   //%note os_trap_1
   274   //%note os_trap_1
   282   if (info != NULL && uc != NULL && thread != NULL) {
   275   if (info != NULL && uc != NULL && thread != NULL) {
   283     pc = (address) os::Linux::ucontext_get_pc(uc);
   276     pc = (address) os::Linux::ucontext_get_pc(uc);
   284 
   277 
   285     if (pc == (address) Fetch32PFI) {
   278     if (StubRoutines::is_safefetch_fault(pc)) {
   286        uc->uc_mcontext.gregs[REG_PC] = intptr_t(Fetch32Resume) ;
   279       uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
   287        return 1 ;
   280       return 1;
   288     }
   281     }
   289 #ifdef AMD64
       
   290     if (pc == (address) FetchNPFI) {
       
   291        uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ;
       
   292        return 1 ;
       
   293     }
       
   294 #endif // AMD64
       
   295 
   282 
   296 #ifndef AMD64
   283 #ifndef AMD64
   297     // Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs
   284     // Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs
   298     // This can happen in any running code (currently more frequently in
   285     // This can happen in any running code (currently more frequently in
   299     // interpreter code but has been seen in compiled code)
   286     // interpreter code but has been seen in compiled code)