[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fXz1GG8oDzZ6kXTDX6KWDChgm+sZO+oo9HgqU4whed5nQ@mail.gmail.com>
Date: Wed, 3 Dec 2025 13:49:09 -0800
From: Ian Rogers <irogers@...gle.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, James Clark <james.clark@...aro.org>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/4] perf stat: Allow no events to open if this is a
"--null" run
On Mon, Dec 1, 2025 at 8:52 PM Ingo Molnar <mingo@...nel.org> wrote:
>
>
> * Ingo Molnar <mingo@...nel.org> wrote:
>
> > With all 4 patches applied to v6.18 'perf stat --null'
> > works fine:
> >
> > Tested-by: Ingo Molnar <mingo@...nel.org>
>
> BTW., there's a long-standing perf-stat --repeat bug
> where signals don't seem to get properly propagated.
>
> The following command takes 10 seconds to run, as
> expected:
>
> starship:~/tip> perf stat --null --repeat 10 sleep 1
>
> Performance counter stats for 'sleep 1' (10 runs):
>
> 1.0026669 +- 0.0000503 seconds time elapsed ( +- 0.01% )
>
> But if I try to interrupt the test:
>
> starship:~/tip> perf stat --null --repeat 10 sleep 1
> ^Csleep: Interrupt
> ^Csleep: Interrupt
>
> Performance counter stats for 'sleep 1' (10 runs):
>
> 0.9250 +- 0.0543 seconds time elapsed ( +- 5.87% )
>
>
> The Ctrl-C only propagates to the <command>, interrupts
> it (as can be seen from the shortened total runtime
> that is less than 10 seconds), and otherwise results in
> both an incorrect measurement and a misleading output
> of the partial results.
>
> Furthermore, the test runs to full completion - which
> can be annoying if you happen to use high --repeat
> counts like I sometimes do. I have to Ctrl-Z and
> killall -9 perf to kill such instances.
I've added a patch that hopefully fixes this in the v2 patch series:
https://lore.kernel.org/lkml/20251203214706.112174-8-irogers@google.com/
Thanks,
Ian
> Thanks,
>
> Ingo
Powered by blists - more mailing lists