Re: [PATCH v4 00/23] perf symbol: Sorted arrays, DSO-owned lifetimes, and memory shrinking

From: Alireza Haghdoost

Date: Sat Nov 14 2026 - 00:26:12 EST


On Fri, Nov 13, 2026 at 9:17 AM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> When profiling large binaries or long-running workloads with many DSOs and
> threads, symbol and DSO tables frequently dominate perf's memory footprint
> and startup latency.
[...]

Hi Ian,

Thanks for v4, and for pulling the three fixes out; they are in
perf-tools-next now. I posted v7 of the lazy loading series on current
perf-tools-next. I apologize for the late turnover.

Lazy loading stays opt-in there for now (just don't have confidence
yet to make it default, see
my reply on v6 4/5). From reading v4, the two series overlap in three places:

- Both use bit 14 of the symbol flags: SYMBOL_FLAG_ANNOTATED in 11/23
and SYMBOL_FLAG_LAZY_NAME in v7 3/4. Bit 15 is the last free one.
- 18/23 replaces the rb-tree. v7 3/4 walks it in two places during
loading: the alias name loading before symbols__fixup_duplicate(),
and the check that skips a .dynsym entry copying a lazy .symtab
symbol. Both would become walks over the sorted array.
- 15/23 defers elf_sym__name() in dso__load_sym_internal(), the loop
where v7 records the name offset instead of the name. Both want the
name as late as possible, so this looks mechanical.

Namhyung, which order do you prefer? lazy loading v7 is four patches;
if Ian's v4 goes
first, I'll rebase v7 on it.

Thanks,
Alireza