Skip to content

Commit 3f8d657

Browse files
Jiri Olsaacmel
authored andcommitted
Revert "perf bench: Fix two memory leaks detected with ASan"
This: This reverts commit 92723ea. # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRRRRRRR Ok # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRR FAILED! # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRR Ok # perf test 91 91: perf stat --bpf-counters test :RRRRRRRRRRRRRRR Ok yep, it seems the perf bench is broken so the counts won't correlated if I revert this one: 92723ea perf bench: Fix two memory leaks detected with ASan it works for me again.. it seems to break -t option [root@dell-r440-01 perf]# ./perf bench sched messaging -g 1 -l 100 -t # Running 'sched/messaging' benchmark: RRRperf: CLIENT: ready write: Bad file descriptor Rperf: SENDER: write: Bad file descriptor Reported-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Jiri Olsa <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Sohaib Mohamed <[email protected]> Cc: Song Liu <[email protected]> Link: https://lore.kernel.org/lkml/YZev7KClb%2Fud43Lc@krava/ Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent cd8c917 commit 3f8d657

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

tools/perf/bench/sched-messaging.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,6 @@ static unsigned int group(pthread_t *pth,
223223
snd_ctx->out_fds[i] = fds[1];
224224
if (!thread_mode)
225225
close(fds[0]);
226-
227-
free(ctx);
228226
}
229227

230228
/* Now we have all the fds, fork the senders */
@@ -241,8 +239,6 @@ static unsigned int group(pthread_t *pth,
241239
for (i = 0; i < num_fds; i++)
242240
close(snd_ctx->out_fds[i]);
243241

244-
free(snd_ctx);
245-
246242
/* Return number of children to reap */
247243
return num_fds * 2;
248244
}

0 commit comments

Comments
 (0)