[all-commits] [llvm/llvm-project] c881d8: [BOLT] Release pseudo-probe decoder after emit (#2...

Rafael Auler via All-commits all-commits at lists.llvm.org
Mon Jul 27 12:34:58 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c881d81f6b189f14c56c9bec8842ddba6255d0e5
      https://github.com/llvm/llvm-project/commit/c881d81f6b189f14c56c9bec8842ddba6255d0e5
  Author: Rafael Auler <rafaelauler at meta.com>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M bolt/include/bolt/Core/BinaryContext.h
    M bolt/lib/Rewrite/PseudoProbeRewriter.cpp
    M bolt/lib/Rewrite/SDTRewriter.cpp

  Log Message:
  -----------
  [BOLT] Release pseudo-probe decoder after emit (#211935)

PseudoProbeRewriter builds sizable data structures and then hold onto
them after they are needed.
PseudoProbeRewriter::postEmitFinalizer() parses the input .pseudo_probe
sections into an MCPseudoProbeDecoder whose address-to-probe and
GUID-to-function-desc maps can be very large (tens of GiB on big
binaries with many probes). This is not used again once probes have been
updated, yet they survive into the memory-heavy DWARF rewrite
(updateDebugInfo), directly inflating BOLT's peak RSS at the worst
possible time.

This frees them at the end of the postEmitFinalizer() calls, before
updateDebugInfo runs.

Stacked on top of the .dwo DIE diff, in large binaries you should
observe ~17% peak RSS wins if your
build uses pseudo probe maps.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list