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 3531453371
commit ad9c7e0789
1 changed files with 3 additions and 3 deletions

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;
}