Revert "[BOLT][Instrumentation] Add mmap return value assertions"
This reverts commit 8f7c53ef81c17ae9d773818181d04ef1c3890912. The stack broke https://lab.llvm.org/buildbot/#/builders/252.
This commit is contained in:
parent
1ea05c0086
commit
d1849045fc
@ -137,8 +137,6 @@ public:
|
||||
StackBase = reinterpret_cast<uint8_t *>(
|
||||
__mmap(0, MaxSize, PROT_READ | PROT_WRITE,
|
||||
(Shared ? MAP_SHARED : MAP_PRIVATE) | MAP_ANONYMOUS, -1, 0));
|
||||
assert(StackBase != MAP_FAILED,
|
||||
"BumpPtrAllocator: failed to mmap stack!");
|
||||
StackSize = 0;
|
||||
}
|
||||
|
||||
@ -710,7 +708,6 @@ ProfileWriterContext readDescriptions() {
|
||||
uint64_t Size = __lseek(FD, 0, 2 /*SEEK_END*/);
|
||||
uint8_t *BinContents = reinterpret_cast<uint8_t *>(
|
||||
__mmap(0, Size, PROT_READ, MAP_PRIVATE, FD, 0));
|
||||
assert(BinContents != MAP_FAILED, "readDescriptions: Failed to mmap self!");
|
||||
Result.MMapPtr = BinContents;
|
||||
Result.MMapSize = Size;
|
||||
Elf64_Ehdr *Hdr = reinterpret_cast<Elf64_Ehdr *>(BinContents);
|
||||
@ -1599,7 +1596,6 @@ extern "C" void __attribute((force_align_arg_pointer)) __bolt_instr_setup() {
|
||||
void *Ret =
|
||||
__mmap(CountersStart, CountersEnd - CountersStart, PROT_READ | PROT_WRITE,
|
||||
MAP_ANONYMOUS | MAP_SHARED | MAP_FIXED, -1, 0);
|
||||
assert(Ret != MAP_FAILED, "__bolt_instr_setup: Failed to mmap counters!");
|
||||
__bolt_ind_call_counter_func_pointer = __bolt_instr_indirect_call;
|
||||
__bolt_ind_tailcall_counter_func_pointer = __bolt_instr_indirect_tailcall;
|
||||
// Conservatively reserve 100MiB shared pages
|
||||
|
Loading…
x
Reference in New Issue
Block a user