[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fUz6ViPHDdS9GCAEYUN39L4MpAnRR4CzJWggg0S8vn39A@mail.gmail.com>
Date: Mon, 16 Jun 2025 09:04:41 -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>, Michael Petlan <mpetlan@...hat.com>,
Andi Kleen <ak@...ux.intel.com>, Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
Tiezhu Yang <yangtiezhu@...ngson.cn>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/4] perf evsel: Missed close when probing hybrid core PMUs
On Fri, Jun 13, 2025 at 5:41 PM Ian Rogers <irogers@...gle.com> wrote:
>
> Add missing close to avoid leaking perf events. In past perfs this
> mattered little as the function was just used by perf list. As the
> function is now used to detect hybrid PMUs leaking the perf event is
> somewhat more painful.
Given this leads to leaking perf events on hybrid systems it would be
nice to land this 1 liner in the next v6.15 rc pull request fixes if
possible.
Thanks,
Ian
> Fixes: b41f1cec91c3 ("perf list: Skip unsupported events")
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
> tools/perf/util/print-events.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/print-events.c b/tools/perf/util/print-events.c
> index a786cbfb0ff5..83aaf7cda635 100644
> --- a/tools/perf/util/print-events.c
> +++ b/tools/perf/util/print-events.c
> @@ -268,6 +268,7 @@ bool is_event_supported(u8 type, u64 config)
> ret = evsel__open(evsel, NULL, tmap) >= 0;
> }
>
> + evsel__close(evsel);
> evsel__delete(evsel);
> }
>
> --
> 2.50.0.rc1.591.g9c95f17f64-goog
>
Powered by blists - more mailing lists