[PATCH] D29954: [PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 12:18:05 PST 2017


davidxl added inline comments.


================
Comment at: lib/profile/InstrProfilingFile.c:560
+  // Temporarily suspend getting SIGKILL when the parent exits.
+  if (prctl(PR_GET_PDEATHSIG, &PDeachSig) == 0 && PDeachSig == SIGKILL)
+    prctl(PR_SET_PDEATHSIG, 0);
----------------
Put the platform dependent utility into InstProfilingUtil.c file.



```
void lprofSuspendSigKill(int *pdeathsig) {
#ifdef __linux__
...
#else 
#endif
}

void lprofRestoreSigKill(int pdeathsig) {
..
}


```


https://reviews.llvm.org/D29954





More information about the llvm-commits mailing list