[PATCH] D44892: Add PerfJITEventListener for perf profiling support.
Andres Freund via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 17:31:05 PDT 2018
anarazel marked 5 inline comments as done.
anarazel added inline comments.
================
Comment at: lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp:389
+ hdr.ElfMach = info.e_machine;
+ ::close(SelfFD);
+ return true;
----------------
reames wrote:
> Instead of the goto error idiom, please use a RAII pattern with a destructor which closes it.
Replaced with MemoryBuffer::getFileSlice(). That reduces the amount of error checking a bit, because it doesn't report "short reads", but that seems ok, given the ELF signature verification.
Repository:
rL LLVM
https://reviews.llvm.org/D44892
More information about the llvm-commits
mailing list