diff options
Diffstat (limited to 'perfetto_hprof/perfetto_hprof.cc')
-rw-r--r-- | perfetto_hprof/perfetto_hprof.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perfetto_hprof/perfetto_hprof.cc b/perfetto_hprof/perfetto_hprof.cc index a27fc5ccc7..c718cc06b0 100644 --- a/perfetto_hprof/perfetto_hprof.cc +++ b/perfetto_hprof/perfetto_hprof.cc @@ -23,6 +23,7 @@ #include <inttypes.h> #include <sched.h> #include <signal.h> +#include <stdlib.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> @@ -913,8 +914,10 @@ void DumpPerfetto(art::Thread* self) { LOG(INFO) << "finished dumping heap for " << parent_pid; // Prevent the atexit handlers to run. We do not want to call cleanup - // functions the parent process has registered. - _exit(0); + // functions the parent process has registered. However, have functions + // registered with `at_quick_exit` (for instance LLVM's code coverage profile + // dumping routine) be called before exiting. + quick_exit(0); } // The plugin initialization function. |