[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250624190326.2038704-1-irogers@google.com>
Date: Tue, 24 Jun 2025 12:03:20 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, James Clark <james.clark@...aro.org>,
Howard Chu <howardchu95@...il.com>, Charlie Jenkins <charlie@...osinc.com>,
Thomas Richter <tmricht@...ux.ibm.com>, Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
Stephen Brennan <stephen.s.brennan@...cle.com>,
Jean-Philippe Romain <jean-philippe.romain@...s.st.com>, Junhao He <hejunhao3@...wei.com>,
"Dr. David Alan Gilbert" <linux@...blig.org>, Dmitry Vyukov <dvyukov@...gle.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v1 0/5] perf test: Sanity check file descriptors are cleaned up
Some recent patches showed we were leaking file descriptors:
https://lore.kernel.org/lkml/20250617223356.2752099-2-irogers@google.com/
When a test is forked the file descriptors >3 can be closed and then
any file descriptors >3 left after the test are leaks. Add this
checking to the forked test code. Prior to that clean up some file
descriptor usage so we can assert that only file descriptors are
cleaned up. Sometimes the file descriptor being held open is the
result of a memory leak, so fix those.
Ian Rogers (5):
perf dso: Add missed dso__put to dso__load_kcore
perf test code-reading: Avoid a leak of cpus and threads
perf hwmon_pmu: Hold path rather than fd
perf dso: With ref count checking, avoid dso_data holding dso live
perf test: In forked mode add check that fds aren't leaked
tools/perf/tests/builtin-test.c | 69 +++++++++++++++++++++++++++++++++
tools/perf/tests/code-reading.c | 7 ----
tools/perf/tests/hwmon_pmu.c | 11 +++---
tools/perf/util/dso.c | 4 ++
tools/perf/util/hwmon_pmu.c | 38 +++++++++++++-----
tools/perf/util/hwmon_pmu.h | 4 +-
tools/perf/util/pmus.c | 2 +-
tools/perf/util/pmus.h | 2 +-
tools/perf/util/symbol.c | 1 +
9 files changed, 112 insertions(+), 26 deletions(-)
--
2.50.0.714.g196bf9f422-goog
Powered by blists - more mailing lists