mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01: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:
parent
c0879829c6
commit
d2dcabc23b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user