Skip to content

perf timechart: Fix memory leaks

Namhyung Kim linux-perf-users lkml sashiko-reviews 3 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 2 repliesApplied
  2. v24 patches 0 repliesSuperseded
  3. v14 patches 8 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/8perf timechart: Don't pass @event to cat_backtrace()tools/perf/builtin-timechart.c+5 -70 replies
2/8perf timechart: Generate backtrace only if neededtools/perf/builtin-timechart.c+10 -40 replies
3/8perf timechart: Remove unused backtrace in trace_handlertools/perf/builtin-timechart.c+23 -410 replies
4/8perf timechart: Remove unnecessary copy of backtracetools/perf/builtin-timechart.c+18 -70 replies
5/8perf timechart: Release event samples at the endtools/perf/builtin-timechart.c+68 -00 replies
6/8perf timechart: Fix memory leaks during recordtools/perf/builtin-timechart.c+20 -111 reply
7/8perf timechart: Fix memory leaks in draw_wakeups()tools/perf/builtin-timechart.c+3 -30 replies
8/8perf test: Update perf timechart testtools/perf/tests/shell/timechart.sh+15 -90 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchArnaldo Carvalho de Melo
1/8
2/8
3/8
4/8
5/8
6/8A-b
7/8
8/8

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

Read the v3 thread

Cover letter [PATCH v3 0/8] perf timechart: Fix memory leaks

Hello,

This patchset fixes memory leaks in the perf timechart code. I've extended and verified the timechart test with ASAN.

I'm sending it with my previous work on backtrace optimization.

v3)
* combine small optimization series

v2)
* use zfree() and explicit clear for potential misuse (Arnaldo)
* fix a wrong condition in the draw_wakeups() (Sashiko)
* move misplaced hunk in the second commit to the first

Thanks,
Namhyung

Namhyung Kim (8):
perf timechart: Don't pass @event to cat_backtrace() perf timechart: Generate backtrace only if needed perf timechart: Remove unused backtrace in trace_handler perf timechart: Remove unnecessary copy of backtrace perf timechart: Release event samples at the end perf timechart: Fix memory leaks during record perf timechart: Fix memory leaks in draw_wakeups() perf test: Update perf timechart test

 tools/perf/builtin-timechart.c      | 212 +++++++++++++++++++---------
 tools/perf/tests/shell/timechart.sh |  24 ++--
 2 files changed, 158 insertions(+), 78 deletions(-)
Signature · 1 line
2.55.0.rc0.799.gd6f94ed593-goog