Skip to content

Commit

Permalink
Add a timer prober
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Oct 20, 2023
1 parent 1e2d840 commit 4157988
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion elf/passes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1250,12 +1250,15 @@ void compute_section_sizes(Context<E> &ctx) {
// inserting thunks. This pass cannot be parallelized. That is,
// create_range_extension_thunks is parallelized internally, but the
// function itself is not thread-safe.
if constexpr (needs_thunk<E>)
if constexpr (needs_thunk<E>) {
Timer t2(ctx, "create_range_extension_thunks");

if (!ctx.arg.relocatable)
for (Chunk<E> *chunk : ctx.chunks)
if (OutputSection<E> *osec = chunk->to_osec())
if (osec->shdr.sh_flags & SHF_EXECINSTR)
osec->create_range_extension_thunks(ctx);
}
}

// Find all unresolved symbols and attach them to the most appropriate files.
Expand Down

0 comments on commit 4157988

Please sign in to comment.