diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-06 11:33:41 -0300 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-06-06 14:42:19 -0300 |
| commit | c3e51ed45ffa7547495a851e33ce332f81ef3665 (patch) | |
| tree | fc52cdc6976137c900c502ac4f5dd6bcb8267afe /tools/perf/scripts/python | |
| parent | 33fa2bf5608fc36bc25231592145f4738f14f11b (diff) | |
perf sched: Free callchain nodes in idle thread cleanup
free_idle_threads() relies on the thread priv destructor (free()) to
clean up idle_thread_runtime structs. But free() doesn't walk the
callchain_cursor linked list or the callchain_root tree allocated
by callchain_cursor__copy() and callchain_append() during --idle-hist
processing. Every idle thread with callchain data leaks these nodes.
Introduce callchain_cursor_cleanup() to free the cursor's linked list
of callchain_cursor_node entries, and call it together with
free_callchain() in free_idle_threads() before thread__put().
Fixes: 225b24f569980ac9 ("perf sched timehist: Save callchain when entering idle")
Reported-by: sashiko-bot <sashiko-bot@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
