linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/4] perf stat: Allow no events to open if this is a "--null" run
Date: Tue, 2 Dec 2025 05:52:30 +0100	[thread overview]
Message-ID: <aS5wjmbAM9ka3M2g@gmail.com> (raw)
In-Reply-To: <aS5u7BkXnA2Q19-8@gmail.com>


* Ingo Molnar <mingo@kernel.org> wrote:

> With all 4 patches applied to v6.18 'perf stat --null' 
> works fine:
> 
>   Tested-by: Ingo Molnar <mingo@kernel.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.

Thanks,

	Ingo

  reply	other threads:[~2025-12-02  4:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01 23:09 [PATCH v1 1/4] perf stat: Allow no events to open if this is a "--null" run Ian Rogers
2025-12-01 23:09 ` [PATCH v1 2/4] libperf cpumap: Fix perf_cpu_map__max for an empty/NULL map Ian Rogers
2025-12-01 23:09 ` [PATCH v1 3/4] perf cpumap: Add "any" CPU handling to cpu_map__snprint_mask Ian Rogers
2025-12-01 23:09 ` [PATCH v1 4/4] perf tests stat: Add "--null" coverage Ian Rogers
2025-12-02  4:38 ` [PATCH v1 1/4] perf stat: Allow no events to open if this is a "--null" run Ingo Molnar
2025-12-02  4:41   ` Ingo Molnar
2025-12-02  4:45     ` Ingo Molnar
2025-12-02  4:52       ` Ingo Molnar [this message]
2025-12-03 21:49         ` Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aS5wjmbAM9ka3M2g@gmail.com \
    --to=mingo@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).