[llvm-branch-commits] [llvm] [BOLT] Page out .dwo files (PR #214903)

Rafael Auler via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 7 17:56:35 PDT 2026


rafaelauler wrote:

Ran multiple benchmarks reported below, testing the net effect of multiple
PRs that deal with memory reduction in BOLT.

Before = BOLT with DIE-materialization changes + pseudo-probe-reset
baseline (landed a while ago, responsible for 10 to 20% RSS
reduction)

After = lazy eh_frame parsing, hashing to avoid duplicating function
names in memory, GlobalSymbols map keyed by a string owned by
MCContext, disabling unnecessary data reordering post-processing step,
delayed materialization of DWO dwarf context objects, paging out .dwo
files

Measured on our largest internal BOLT-optimized binary

  Peak RSS (sampled)     142.7 GiB -> 61.2 GiB    -57%
  Peak anon                     76.6 GiB -> 47.3 GiB    -38%
  Peak file-backed              66.9 GiB -> 14.1 GiB    -79%
  RSS after readDebugInfo       92.0 GiB -> 30.5 GiB    -67%
    of which file-backed        41.5 GiB ->  4.2 GiB    -90%
  maxresident (/usr/bin/time)             -> 71.9 GiB

no wall time before/or max resident because workload OOMed on my
box without these changes.

Wall-time A/B on smaller binary:

                        baseline       with       delta
  smaller wall          398.3 s      401.9 s      +0.9%
  smaller peak RSS       64.1 GiB     29.1 GiB   -54.6%
  strict-mode-binary wall             1117.4 s     1119.8 s      +0.2%
  strict-mode-binary peak RSS           89.0 GiB     85.5 GiB    -4.0%

Medians of 3. The baseline's own spread on smaller binary is 382-413 s, so
both wall deltas sit inside run-to-run noise.

strict-mode-binary reclaims little memory because its peak is BOLT IR
(using no-lite mode).

https://github.com/llvm/llvm-project/pull/214903


More information about the llvm-branch-commits mailing list