Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[memprof] dump memprof profile when receive deadly signals
Currently memprof profile is dumped when program exits (call `FinishAndWrite()` in ~Allocator) or `__memprof_profile_dump` is manually called. For programs that never exit (e.g. server-side application), it will be useful to dump memprof profile when specific signal is received. This patch installs a signal handler for deadly signals(SIGSEGV, SIGBUS, SIGABRT, SIGILL, SIGTRAP, SIGFPE) like we do in other sanitizers. In the signal handler `__memprof_profile_dump` is called to dump memprof profile. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D134795
- Loading branch information