All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] perf symbols/callchain/annotate: Bug fixes from symbol reference counting review
@ 2026-10-31  6:35 Ian Rogers
  2026-10-31  6:35 ` [PATCH 1/3] perf callchain: Fix loss of symbol in merge_chain_branch() Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ian Rogers @ 2026-10-31  6:35 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim
  Cc: Jiri Olsa, Adrian Hunter, James Clark, Alireza Haghdoost,
	linux-perf-users, linux-kernel, Ian Rogers

While reviewing the v2 symbol reference counting series [1], Alireza
Haghdoost identified three existing bugs in callchain merging, ELF
zero-size symbol end calculation across .symtab and .dynsym, and basic
block range splitting/cleanup in 'perf annotate'.

Pull these three fixes out ahead of v3 of the main series so they can
land for the v7.4 merge window:

1. perf callchain: Fix loss of symbol in merge_chain_branch()
   Restore .sym = list->ms.sym when constructing the temporary
   struct map_symbol in merge_chain_branch(), fixing missing symbol
   names and inlined frames in 'perf report --children'.

2. perf symbol-elf: Fix zero-size symbol end calculation across .symtab
   and .dynsym
   Move symbols__fixup_end(), symbols__fixup_duplicate(), and
   maps__fixup_end() from dso__load_sym_internal() to dso__load_sym() so
   zero-size .symtab symbols do not get extended across following
   .dynsym-only functions before .dynsym is loaded, and add a unit test
   in 'perf test symbols'.

3. perf annotate: Fix block_range symbol loss on split and leaks on exit
   Preserve .sym = entry->sym when splitting head/tail basic block
   ranges in block_range__create(), add block_ranges__exit(), and release
   resolved branch_info addr_map_symbol references in
   process_branch_stack().

This series was prepared with the assistance of Antigravity and Gemini 4.

Link: https://lore.kernel.org/linux-perf-users/20261027231513.816148-1-irogers@google.com/ [1]
Assisted-by: Antigravity:Gemini-4

Ian Rogers (3):
  perf callchain: Fix loss of symbol in merge_chain_branch()
  perf symbol-elf: Fix zero-size symbol end calculation across .symtab
    and .dynsym
  perf annotate: Fix block_range symbol loss on split and leaks on exit

 tools/perf/builtin-annotate.c |   5 +
 tools/perf/tests/symbols.c    | 169 ++++++++++++++++++++++++++++++++++
 tools/perf/util/block-range.c |  16 ++++
 tools/perf/util/block-range.h |   1 +
 tools/perf/util/callchain.c   |   1 +
 tools/perf/util/symbol-elf.c  |  36 +++++---
 6 files changed, 213 insertions(+), 15 deletions(-)

-- 
2.56.0.317.g454f8302e1-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-31  6:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-31  6:35 [PATCH 0/3] perf symbols/callchain/annotate: Bug fixes from symbol reference counting review Ian Rogers
2026-10-31  6:35 ` [PATCH 1/3] perf callchain: Fix loss of symbol in merge_chain_branch() Ian Rogers
2026-10-31  6:39   ` sashiko-bot
2026-10-31  6:35 ` [PATCH 2/3] perf symbol-elf: Fix zero-size symbol end calculation across .symtab and .dynsym Ian Rogers
2026-10-31  6:41   ` sashiko-bot
2026-10-31  6:35 ` [PATCH 3/3] perf annotate: Fix block_range symbol loss on split and leaks on exit Ian Rogers
2026-10-31  6:47   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.