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
|
// Mapping must be PROT_EXEC to ensure it is captured by perf record
|
||||||
// even when not using -d option.
|
// even when not using -d option.
|
||||||
MarkerAddr = ::mmap(NULL, sys::Process::getPageSize(), PROT_READ | PROT_EXEC,
|
MarkerAddr = ::mmap(NULL, sys::Process::getPageSizeEstimate(),
|
||||||
MAP_PRIVATE, DumpFd, 0);
|
PROT_READ | PROT_EXEC, MAP_PRIVATE, DumpFd, 0);
|
||||||
|
|
||||||
if (MarkerAddr == MAP_FAILED) {
|
if (MarkerAddr == MAP_FAILED) {
|
||||||
errs() << "could not mmap JIT marker\n";
|
errs() << "could not mmap JIT marker\n";
|
||||||
@ -355,7 +355,7 @@ void PerfJITEventListener::CloseMarker() {
|
|||||||
if (!MarkerAddr)
|
if (!MarkerAddr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
munmap(MarkerAddr, sys::Process::getPageSize());
|
munmap(MarkerAddr, sys::Process::getPageSizeEstimate());
|
||||||
MarkerAddr = nullptr;
|
MarkerAddr = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user