Skip to content

perf sched: Fix various memory leaks

Namhyung Kim linux-perf-users lkml 1 version Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8perf sched: Make sure it frees the usage stringtools/perf/builtin-sched.c+13 -121 reply
2/8perf sched: Free thread->priv using priv_destructortools/perf/builtin-sched.c+2 -01 reply
3/8perf sched: Fix memory leaks in 'perf sched map'tools/perf/builtin-sched.c+20 -111 reply
4/8perf sched: Fix thread leaks in 'perf sched timehist'tools/perf/builtin-sched.c+37 -111 reply
5/8perf sched: Fix memory leaks for evsel->priv in timehisttools/perf/builtin-sched.c tools/perf/util/evsel.c tools/perf/util/evsel.h+25 -01 reply
6/8perf sched: Use RC_CHK_EQUAL() to compare pointerstools/perf/builtin-sched.c+1 -11 reply
7/8perf sched: Fix memory leaks in 'perf sched latency'tools/perf/builtin-sched.c+24 -31 reply
8/8perf test: Add more test cases to sched testtools/perf/tests/shell/sched.sh+31 -81 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchIan Rogers
SeriesT-b
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8R-b
8/8R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCHSET 0/8] perf sched: Fix various memory leaks

Hello,

While running the new perf sched test with ASAN, it fails due to memory leaks. They comes mostly from missing thread__put() but sometimes it needs to release other data structures.

Fix those leaks and add more subcommands to the test.

Thanks,
Namhyung

Namhyung Kim (8):
perf sched: Make sure it frees the usage string perf sched: Free thread->priv using priv_destructor perf sched: Fix memory leaks in 'perf sched map' perf sched: Fix thread leaks in 'perf sched timehist' perf sched: Fix memory leaks for evsel->priv in timehist perf sched: Use RC_CHK_EQUAL() to compare pointers perf sched: Fix memory leaks in 'perf sched latency' perf test: Add more test cases to sched test

 tools/perf/builtin-sched.c      | 147 +++++++++++++++++++++++---------
 tools/perf/tests/shell/sched.sh |  39 +++++++--
 tools/perf/util/evsel.c         |  11 +++
 tools/perf/util/evsel.h         |   2 +
 4 files changed, 153 insertions(+), 46 deletions(-)
Signature · 1 line
2.50.0.727.gbf7dc18ff4-goog