< prev index next >

src/os_cpu/windows_x86/vm/thread_windows_x86.cpp

Print this page




  57   // if we were running Java code when SIGPROF came in.
  58   if (isInJava) {
  59     CONTEXT* uc = (CONTEXT*)ucontext;
  60 
  61 #ifdef AMD64
  62     intptr_t* ret_fp = (intptr_t*) uc->Rbp;
  63     intptr_t* ret_sp = (intptr_t*) uc->Rsp;
  64     ExtendedPC addr = ExtendedPC((address)uc->Rip);
  65 #else
  66     intptr_t* ret_fp = (intptr_t*) uc->Ebp;
  67     intptr_t* ret_sp = (intptr_t*) uc->Esp;
  68     ExtendedPC addr = ExtendedPC((address)uc->Eip);
  69 #endif // AMD64
  70     if (addr.pc() == NULL || ret_sp == NULL ) {
  71       // CONTEXT wasn't useful
  72       return false;
  73     }
  74 
  75     frame ret_frame(ret_sp, ret_fp, addr.pc());
  76     if (!ret_frame.safe_for_sender(jt)) {
  77 #ifdef COMPILER2
  78       // C2 uses ebp as a general register see if NULL fp helps
  79       frame ret_frame2(ret_sp, NULL, addr.pc());
  80       if (!ret_frame2.safe_for_sender(jt)) {
  81         // nothing else to try if the frame isn't good
  82         return false;
  83       }
  84       ret_frame = ret_frame2;
  85 #else
  86       // nothing else to try if the frame isn't good
  87       return false;
  88 #endif /* COMPILER2 */
  89     }
  90     *fr_addr = ret_frame;
  91     return true;
  92   }
  93 
  94   // nothing else to try
  95   return false;
  96 }
  97 
  98 void JavaThread::cache_global_variables() { }


  57   // if we were running Java code when SIGPROF came in.
  58   if (isInJava) {
  59     CONTEXT* uc = (CONTEXT*)ucontext;
  60 
  61 #ifdef AMD64
  62     intptr_t* ret_fp = (intptr_t*) uc->Rbp;
  63     intptr_t* ret_sp = (intptr_t*) uc->Rsp;
  64     ExtendedPC addr = ExtendedPC((address)uc->Rip);
  65 #else
  66     intptr_t* ret_fp = (intptr_t*) uc->Ebp;
  67     intptr_t* ret_sp = (intptr_t*) uc->Esp;
  68     ExtendedPC addr = ExtendedPC((address)uc->Eip);
  69 #endif // AMD64
  70     if (addr.pc() == NULL || ret_sp == NULL ) {
  71       // CONTEXT wasn't useful
  72       return false;
  73     }
  74 
  75     frame ret_frame(ret_sp, ret_fp, addr.pc());
  76     if (!ret_frame.safe_for_sender(jt)) {
  77 #if defined(COMPILER2) || INCLUDE_JVMCI
  78       // C2 and JVMCI use ebp as a general register see if NULL fp helps
  79       frame ret_frame2(ret_sp, NULL, addr.pc());
  80       if (!ret_frame2.safe_for_sender(jt)) {
  81         // nothing else to try if the frame isn't good
  82         return false;
  83       }
  84       ret_frame = ret_frame2;
  85 #else
  86       // nothing else to try if the frame isn't good
  87       return false;
  88 #endif /* COMPILER2 || INCLUDE_JVMCI */
  89     }
  90     *fr_addr = ret_frame;
  91     return true;
  92   }
  93 
  94   // nothing else to try
  95   return false;
  96 }
  97 
  98 void JavaThread::cache_global_variables() { }
< prev index next >