[profile] Avoid duplicating or leaking VMO
authorPetr Hosek <phosek@google.com>
Sat, 28 Mar 2020 00:48:28 +0000 (17:48 -0700)
committerPetr Hosek <phosek@google.com>
Fri, 17 Apr 2020 07:54:12 +0000 (00:54 -0700)
commit485862ecdac4a7c67c515da2e8af209d5c17d911
tree6a4b5c7b577997d9194e4a027673899d3ec483d6
parentf88000a4b5226c590482e9c7cae9d861f59a7317
[profile] Avoid duplicating or leaking VMO

Now that write data continously into the memory mapping, we don't need
to keep the VMO handle around after it has been mapped. This change also
ensures that the VMO is always closed on error.

Differential Revision: https://reviews.llvm.org/D76963
compiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c