From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>,
linux-perf-users@vger.kernel.org,
Jan Polensky <japo@linux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: perf stat issue with 7.0.0rc3
Date: Tue, 17 Mar 2026 16:39:20 -0300 [thread overview]
Message-ID: <abmt6FhLfWrzWGwU@x1> (raw)
In-Reply-To: <CAP-5=fWG0Q-xNGn_-_KGCopaNsWG5rUN3pYNLEh3K7+xE0OwVQ@mail.gmail.com>
On Fri, Mar 13, 2026 at 08:41:48AM -0700, Ian Rogers wrote:
> On Fri, Mar 13, 2026 at 8:19 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > On Fri, Mar 13, 2026 at 02:13:18PM +0100, Thomas Richter wrote:
> > > I just discovered a strange behavior on linux 7.0.0rc3.
> > > This is the epected output, however when I use the perf version 7.0.0rc3:
> > > bash-5.3# ./perf -v
> > > perf version 7.0.rc3.g1f318b96cc84
> > > bash-5.3# ./perf stat -- true
> > > Error:
> > > No supported events found.
> > > trace.args_alignment
> > And this last line is even stranger, in my case I get something else,
> > also on x86_64:
> > root@number:~# perf stat -- true
> > Error:
> > No supported events found.
> > addr2line.style
> > root@number:~#
> > On an ARM machine:
> > acme@raspberrypi:~/git/perf-tools $ perf stat -- true
> > Error:
> > No supported events found.
> > acme@raspberrypi:~/git/perf-tools $ uname -a
> > Linux raspberrypi 6.12.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.62-1+rpt1 (2025-12-18) aarch64 GNU/Linux
> > acme@raspberrypi:~/git/perf-tools $
> > I'll try to bisect this later, thanks for the report!
> Hi Arnaldo,
> Leo has pointed at the fix:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/commit/tools/perf/util/metricgroup.c?h=perf-tools-next&id=c5a244bf17caf2de22f9e100832b75f72b31d3e6
> This also showed up as missing for the LTS backports:
> https://lore.kernel.org/lkml/ad95d781-7eb2-4c0c-a9e9-aaabae8eb602@kernel.org/
> so I thought it was flagged as a fix for the next PR. I don't see it in there:
> https://lore.kernel.org/lkml/20260313151434.1695228-1-acme@kernel.org/
> Could we get it in?
So, I applied the one Leo pointed out and got this:
root@number:~# perf stat sleep 1
Performance counter stats for 'sleep 1':
1 context-switches # 3509.1 cs/sec cs_per_second
0 cpu-migrations # 0.0 migrations/sec migrations_per_second
75 page-faults # 263181.0 faults/sec page_faults_per_second
0.28 msec task-clock # 0.0 CPUs CPUs_utilized
8,018 branch-misses # 4.2 % branch_miss_rate
191,108 branches # 670.6 M/sec branch_frequency
870,234 cpu-cycles # 3.1 GHz cycles_frequency
<not counted> instructions # nan instructions insn_per_cycle (0.00%)
<not counted> stalled-cycles-frontend # nan frontend_cycles_idle (0.00%)
1.001839832 seconds time elapsed
0.000727000 seconds user
0.000000000 seconds sys
Some events weren't counted. Try disabling the NMI watchdog:
echo 0 > /proc/sys/kernel/nmi_watchdog
perf stat ...
echo 1 > /proc/sys/kernel/nmi_watchdog
root@number:~# echo 0 > /proc/sys/kernel/nmi_watchdog
Which is strange, in the past (see below) instructions and
stalled-cycles-frontend were counted in the default (no -e) 'perf stat'
set of events, now if I disable the nmi_watchdog I get 'instructions'
back, but not 'stalled-cycles-frontend':
root@number:~# perf stat sleep 1
Performance counter stats for 'sleep 1':
1 context-switches # 6524.7 cs/sec cs_per_second
0 cpu-migrations # 0.0 migrations/sec migrations_per_second
71 page-faults # 463256.0 faults/sec page_faults_per_second
0.15 msec task-clock # 0.0 CPUs CPUs_utilized
7,484 branch-misses # 4.0 % branch_miss_rate
186,108 branches # 1214.3 M/sec branch_frequency
810,475 cpu-cycles # 5.3 GHz cycles_frequency
893,290 instructions # 1.1 instructions insn_per_cycle
<not counted> stalled-cycles-frontend # nan frontend_cycles_idle (0.00%)
1.000382345 seconds time elapsed
0.000443000 seconds user
0.000000000 seconds sys
If I go back to v6.18 (will try a bisect to see exactly where this
happens), I get the events above, with a different printing order, but
'instructions' and 'stalled-cycles-frontend' successfully counts:
root@number:~# perf -v
perf version 6.18.g7d0a66e4bb90
root@number:~# perf stat sleep 1
Performance counter stats for 'sleep 1':
202,103 task-clock # 0.000 CPUs utilized
1 context-switches # 4.948 K/sec
0 cpu-migrations # 0.000 /sec
71 page-faults # 351.306 K/sec
895,485 instructions # 0.85 insn per cycle
# 0.56 stalled cycles per insn
1,048,898 cycles # 5.190 GHz
504,794 stalled-cycles-frontend # 48.13% frontend cycles idle
186,002 branches # 920.333 M/sec
7,857 branch-misses # 4.22% of all branches
1.000537221 seconds time elapsed
0.000542000 seconds user
0.000000000 seconds sys
root@number:~#
Trying bisection now.
- Arnaldo
next prev parent reply other threads:[~2026-03-17 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:13 perf stat issue with 7.0.0rc3 Thomas Richter
2026-03-13 15:13 ` Leo Yan
2026-03-13 15:19 ` Arnaldo Carvalho de Melo
2026-03-13 15:41 ` Ian Rogers
2026-03-13 15:56 ` Arnaldo Melo
2026-03-13 16:10 ` Ian Rogers
2026-03-13 17:01 ` Arnaldo Melo
2026-03-13 18:27 ` Ian Rogers
2026-03-13 21:10 ` Namhyung Kim
2026-03-17 20:19 ` Arnaldo Carvalho de Melo
2026-03-17 19:39 ` Arnaldo Carvalho de Melo [this message]
2026-03-17 19:56 ` Arnaldo Carvalho de Melo
2026-03-17 20:12 ` Arnaldo Carvalho de Melo
2026-03-17 20:50 ` Ian Rogers
2026-03-18 0:37 ` Arnaldo Carvalho de Melo
2026-03-18 2:25 ` Ian Rogers
2026-03-19 1:01 ` [PATCH v1] perf metrics: Make common stalled metrics conditional on having the event Ian Rogers
2026-03-24 4:19 ` perf stat issue with 7.0.0rc3 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=abmt6FhLfWrzWGwU@x1 \
--to=acme@kernel.org \
--cc=irogers@google.com \
--cc=japo@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=tmricht@linux.ibm.com \
/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