< prev index next >

src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp

Print this page




  64     intptr_t* ret_sp = (intptr_t*) uc->Rsp;
  65     ExtendedPC addr = ExtendedPC((address)uc->Rip);
  66 #else
  67     intptr_t* ret_fp = (intptr_t*) uc->Ebp;
  68     intptr_t* ret_sp = (intptr_t*) uc->Esp;
  69     ExtendedPC addr = ExtendedPC((address)uc->Eip);
  70 #endif // AMD64
  71     if (addr.pc() == NULL || ret_sp == NULL ) {
  72       // CONTEXT wasn't useful
  73       return false;
  74     }
  75 
  76     if (MetaspaceShared::is_in_trampoline_frame(addr.pc())) {
  77       // In the middle of a trampoline call. Bail out for safety.
  78       // This happens rarely so shouldn't affect profiling.
  79       return false;
  80     }
  81 
  82     frame ret_frame(ret_sp, ret_fp, addr.pc());
  83     if (!ret_frame.safe_for_sender(jt)) {
  84 #if defined(COMPILER2) || INCLUDE_JVMCI
  85       // C2 and JVMCI use ebp as a general register see if NULL fp helps
  86       frame ret_frame2(ret_sp, NULL, addr.pc());
  87       if (!ret_frame2.safe_for_sender(jt)) {
  88         // nothing else to try if the frame isn't good
  89         return false;
  90       }
  91       ret_frame = ret_frame2;
  92 #else
  93       // nothing else to try if the frame isn't good
  94       return false;
  95 #endif /* COMPILER2 || INCLUDE_JVMCI */
  96     }
  97     *fr_addr = ret_frame;
  98     return true;
  99   }
 100 
 101   // nothing else to try
 102   return false;
 103 }
 104 
 105 void JavaThread::cache_global_variables() { }


  64     intptr_t* ret_sp = (intptr_t*) uc->Rsp;
  65     ExtendedPC addr = ExtendedPC((address)uc->Rip);
  66 #else
  67     intptr_t* ret_fp = (intptr_t*) uc->Ebp;
  68     intptr_t* ret_sp = (intptr_t*) uc->Esp;
  69     ExtendedPC addr = ExtendedPC((address)uc->Eip);
  70 #endif // AMD64
  71     if (addr.pc() == NULL || ret_sp == NULL ) {
  72       // CONTEXT wasn't useful
  73       return false;
  74     }
  75 
  76     if (MetaspaceShared::is_in_trampoline_frame(addr.pc())) {
  77       // In the middle of a trampoline call. Bail out for safety.
  78       // This happens rarely so shouldn't affect profiling.
  79       return false;
  80     }
  81 
  82     frame ret_frame(ret_sp, ret_fp, addr.pc());
  83     if (!ret_frame.safe_for_sender(jt)) {
  84 #if COMPILER2_OR_JVMCI
  85       // C2 and JVMCI use ebp as a general register see if NULL fp helps
  86       frame ret_frame2(ret_sp, NULL, addr.pc());
  87       if (!ret_frame2.safe_for_sender(jt)) {
  88         // nothing else to try if the frame isn't good
  89         return false;
  90       }
  91       ret_frame = ret_frame2;
  92 #else
  93       // nothing else to try if the frame isn't good
  94       return false;
  95 #endif // COMPILER2_OR_JVMCI
  96     }
  97     *fr_addr = ret_frame;
  98     return true;
  99   }
 100 
 101   // nothing else to try
 102   return false;
 103 }
 104 
 105 void JavaThread::cache_global_variables() { }
< prev index next >