aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorEnna1 <xumingjie.enna1@bytedance.com>2022-10-08 09:55:40 +0800
committerxumingjie.enna1 <xumingjie.enna1@bytedance.com>2022-10-08 10:08:23 +0800
commit9e80add2cfa9bb03bbe77cca9adec18137204538 (patch)
treed6c80a03afc46db53fa2e18b5e4bdd923665e686 /clang/lib/Sema/SemaModule.cpp
parentf0c93fd4cac76d9ae1b2ff99c40c08abeb940f21 (diff)
downloadllvm-9e80add2cfa9bb03bbe77cca9adec18137204538.zip
llvm-9e80add2cfa9bb03bbe77cca9adec18137204538.tar.gz
llvm-9e80add2cfa9bb03bbe77cca9adec18137204538.tar.bz2
[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
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions