Skip to content

Commit

Permalink
Increase memory of BOLT runtime instrumentation bump allocator used f…
Browse files Browse the repository at this point in the history
…or 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
  • Loading branch information
Kobzol authored and aaupov committed Jun 8, 2023
1 parent 66d4dba commit eaf1b56
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bolt/runtime/instr.cpp
Expand Up @@ -1471,6 +1471,7 @@ __bolt_instr_data_dump() {
int FD = openProfile();

BumpPtrAllocator Alloc;
Alloc.setMaxSize(0x6400000);
const uint8_t *FuncDesc = Ctx.FuncDescriptions;
for (int I = 0, E = __bolt_instr_num_funcs; I < E; ++I) {
FuncDesc = writeFunctionProfile(FD, Ctx, FuncDesc, Alloc);
Expand Down

0 comments on commit eaf1b56

Please sign in to comment.