1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Fix LLVM_USE_PERF build after getPageSize change

Commit r360221 ("[Support] Add error handling to
sys::Process::getPageSize().", 2019-05-08) seems to have missed these
uses of getPageSize().  Update them to getPageSizeEstimate().

llvm-svn: 360322
This commit is contained in:
Sven van Haastregt 2019-05-09 10:10:44 +00:00
parent c0879829c6
commit d2dcabc23b

View File

@ -341,8 +341,8 @@ bool PerfJITEventListener::OpenMarker() {
//
// Mapping must be PROT_EXEC to ensure it is captured by perf record
// even when not using -d option.
MarkerAddr = ::mmap(NULL, sys::Process::getPageSize(), PROT_READ | PROT_EXEC,
MAP_PRIVATE, DumpFd, 0);
MarkerAddr = ::mmap(NULL, sys::Process::getPageSizeEstimate(),
PROT_READ | PROT_EXEC, MAP_PRIVATE, DumpFd, 0);
if (MarkerAddr == MAP_FAILED) {
errs() << "could not mmap JIT marker\n";
@ -355,7 +355,7 @@ void PerfJITEventListener::CloseMarker() {
if (!MarkerAddr)
return;
munmap(MarkerAddr, sys::Process::getPageSize());
munmap(MarkerAddr, sys::Process::getPageSizeEstimate());
MarkerAddr = nullptr;
}