[PATCH] D138175: [MemProf] Defer profile file setup until dump time
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 16 18:13:17 PST 2022
tejohnson created this revision.
tejohnson added a reviewer: snehasish.
Herald added a subscriber: Enna1.
Herald added a project: All.
tejohnson requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
With all of the writing of the memprof profile consolidated into one
place, there is no need to set up the profile file (which creates the
file and also redirects all printing from the runtime to it) until we
are ready to dump the profile.
This allows errors and other messages to be dumped to stderr instead of
the profile file, which by default is in a binary format. Additionally,
reset the output file to stderr after dumping the profile so that any
requested memprof allocator statistics are printed to stderr.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138175
Files:
compiler-rt/lib/memprof/memprof_allocator.cpp
compiler-rt/lib/memprof/memprof_rtl.cpp
compiler-rt/test/memprof/TestCases/atexit_stats.cpp
compiler-rt/test/memprof/TestCases/malloc-size-too-big.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138175.475978.patch
Type: text/x-patch
Size: 4544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221117/9f9bf982/attachment.bin>
More information about the llvm-commits
mailing list