cpp/profiler/ArtCompatibilityRunner.cpp
void JumpToSafetySignalHandler(
    SignalHandler::HandlerScope scope,
    int signum,
    siginfo_t* siginfo,
    void* ucontext) {
  SignalState& state = *(SignalState*)scope.GetData();

  if (state.tid == threadID() && state.inSection.load()) {
    scope.siglongjmp(state.sigJmpBuf, 1);
  }

  scope.CallPreviousHandler(signum, siginfo, ucontext);
}
// Signal handler to safely bail out. This is inspired by how the
// SamplingProfiler signal handling works, but is way simpler.
Signal handler to safely bail out. This is inspired by how the
SamplingProfiler signal handling works, but is way simpler.
Signal handler to safely bail out . This is inspired by how the SamplingProfiler signal handling works but is way simpler .
void JumpToSafetySignalHandler(
    SignalHandler::HandlerScope scope,
    int signum,
    siginfo_t* siginfo,
    void* ucontext) {
  SignalState& state = *(SignalState*)scope.GetData();
  if (state.tid == threadID() && state.inSection.load()) {
    scope.siglongjmp(state.sigJmpBuf, 1);
  }
  scope.CallPreviousHandler(signum, siginfo, ucontext);
}
void JumpToSafetySignalHandler ( SignalHandler :: HandlerScope scope , int signum , siginfo_t * siginfo , void * ucontext ) { SignalState & state = * ( SignalState * ) scope . GetData ( ) ; if ( state . tid == threadID ( ) && state . inSection . load ( ) ) { scope . siglongjmp ( state . sigJmpBuf , 1 ) ; } scope . CallPreviousHandler ( signum , siginfo , ucontext ) ; }
Signal handler to safely bail out.
Signal handler to safely bail out .