Re: [PATCH v2 0/4] perf tools: Fix thread cache race, stat per-pkg delta bug, and memory leaks
From: Namhyung Kim
Date: Fri Dec 04 2026 - 12:19:51 EST
On Mon, 30 Nov 2026 14:43:28 -0800, Ian Rogers wrote:
> Four standalone bug fixes for pre-existing issues in perf tools uncovered
> during Sashiko review:
>
> 1. util/threads.c: Fix a race between threads__find() and
> threads__remove() where dropping table->lock between lookup and
> updating table->last_match could resurrect a removed thread in
> last_match (and avoid taking down_write(&table->lock) on last_match
> cache hits).
> 2. util/stat.c: Fix process_counter_values() on skipped per-pkg secondary
> CPUs: compute interval deltas before check_per_pkg() so prev_raw_counts
> and interval ena/run are accurate, remove the static zero struct, and
> return 0 when skip is true so non-global aggregation modes (such as
> --per-socket and --per-die) do not mark ps_aggr failed (<not counted>)
> or inflate ps_aggr->nr.
> 3. util/metricgroup.c: Fix realloc() failure memory leaks of pending in
> resolve_metric() and root_metric->metric_refs in __add_metric().
> 4. util/pmu.c: Free alias on parse_double() and io__getline() error
> returns in perf_pmu__new_alias().
>
> [...]
Applied to perf-tools-next, thanks!
Best regards
Namhyung