[PATCH v7 0/6] perf ui hists / annotate: Remaining fixes for reference counting and annotation

Ian Rogers posted 6 patches 23 hours ago
tools/perf/builtin-report.c       |   7 +-
tools/perf/ui/browsers/annotate.c |   2 +-
tools/perf/ui/browsers/hists.c    | 153 ++++++++++++++++++++----------
tools/perf/util/annotate.c        |  51 +++++++---
tools/perf/util/annotate.h        |   3 +-
tools/perf/util/capstone.c        |  42 ++++++--
tools/perf/util/hist.c            |   1 +
7 files changed, 182 insertions(+), 77 deletions(-)
[PATCH v7 0/6] perf ui hists / annotate: Remaining fixes for reference counting and annotation
Posted by Ian Rogers 23 hours ago
This series contains the remaining 6 unmerged patches from our UI, hists,
and annotate fix series. Upstream maintainer Namhyung Kim applied patches
1-6 (except patch 4) from the v6 series into perf-tools-next.

This v7 series includes:
  - Fix stack use-after-return for symbol_filter_str by duplicating with
    strdup() and freeing during evsel destruction in hists_evsel__exit().
  - Guard against NULL hist_entry in add_script_opt() when trace is empty.
  - Populate map_symbol thread in report UI with proper reference counting
    (map_symbol__copy, thread__get) and memset zeroing in
    free_popup_actions().
  - Fix dso_filter reference leak and exit zoom cleanup.
  - Robust cross-platform disassembly fallback when annotating without a
    thread.
  - Remove duplicated thread member from struct popup_action (placed at the
    end of the series per reviewer feedback).

v7 Changes:
  - Rebased onto latest perf-tools-next (after patches 1-3, 5-6 were
    merged).
  - Move symbol_filter_str teardown to hists_evsel__exit() to allow filter
    persistence across TUI navigation while preventing memory leaks.
  - Add memset zeroing to free_popup_actions() to prevent cross-iteration
    stale action leakage.
  - Placed "Remove duplicated thread in popup_action" as the final patch
    in the series as requested.

Ian Rogers (6):
  perf ui hists: Fix stack use-after-return in symbol_filter_str
  perf ui hists: Guard against NULL hist_entry in add_script_opt()
  perf ui hists: In report UI ensure thread is set with reference
    counting
  perf ui hists: Fix dso_filter reference leak and exit zoom cleanup
  perf annotate: Be robust to annotating without a thread
  perf ui hists: Remove duplicated thread in popup_action

 tools/perf/builtin-report.c       |   7 +-
 tools/perf/ui/browsers/annotate.c |   2 +-
 tools/perf/ui/browsers/hists.c    | 153 ++++++++++++++++++++----------
 tools/perf/util/annotate.c        |  51 +++++++---
 tools/perf/util/annotate.h        |   3 +-
 tools/perf/util/capstone.c        |  42 ++++++--
 tools/perf/util/hist.c            |   1 +
 7 files changed, 182 insertions(+), 77 deletions(-)

-- 
2.55.0.229.g6434b31f56-goog