Skip to content

Commit eaf1b56

Browse files
Kobzolaaupov
authored andcommitted
Increase memory of BOLT runtime instrumentation bump allocator used for writing resulting profile
The BOLT instrumentation runtime uses a bump allocator that has a fixed amount of maximum memory. In some cases, this memory limit is not large enough (#59174). We are hitting this limit when instrumenting the Rust compiler with BOLT. This change increases the memory of the bump allocator used for writing the resulting BOLT profile. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D151891
1 parent 66d4dba commit eaf1b56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bolt/runtime/instr.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,7 @@ __bolt_instr_data_dump() {
14711471
int FD = openProfile();
14721472

14731473
BumpPtrAllocator Alloc;
1474+
Alloc.setMaxSize(0x6400000);
14741475
const uint8_t *FuncDesc = Ctx.FuncDescriptions;
14751476
for (int I = 0, E = __bolt_instr_num_funcs; I < E; ++I) {
14761477
FuncDesc = writeFunctionProfile(FD, Ctx, FuncDesc, Alloc);

0 commit comments

Comments
 (0)