[Fuchsia] Create the VMO during initialization, not during exit
authorPetr Hosek <phosek@chromium.org>
Sat, 17 Aug 2019 00:54:22 +0000 (00:54 +0000)
committerPetr Hosek <phosek@chromium.org>
Sat, 17 Aug 2019 00:54:22 +0000 (00:54 +0000)
commitedf504f5038b573a3e2f0eedfa7de69ec0ab9e7f
treecabcfadd086c67329e17f54b46338166689f3022
parent69cef325a337bb1a498689a95dd17de4d4a074cc
[Fuchsia] Create the VMO during initialization, not during exit

We want to avoid doing expensive work during atexit since the process
might be terminated before we can publish the VMO and write out the
symbolizer markup, so move the VMO creation to the initialization
phase and only write data during the atexit phase.

Differential Revision: https://reviews.llvm.org/D66323

llvm-svn: 369180
compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c