From: Namhyung Kim <namhyung@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>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf stat: Additional verbose details for <not supported> events
Date: Tue, 14 Oct 2025 23:04:25 +0900 [thread overview]
Message-ID: <aO5YaR_B8ZYMdHa_@google.com> (raw)
In-Reply-To: <CAP-5=fVERf8jf3MrwiEfQtChvC1KUe0EEASK1aVk-UKkk=Pb0w@mail.gmail.com>
On Thu, Oct 09, 2025 at 06:31:51AM -0700, Ian Rogers wrote:
> On Wed, Oct 8, 2025 at 10:51 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Wed, Oct 08, 2025 at 09:31:53AM -0700, Ian Rogers wrote:
> > > On Wed, Oct 8, 2025 at 1:43 AM Namhyung Kim <namhyung@kernel.org> wrote:
> > > >
> > > > On Sun, Oct 05, 2025 at 11:14:21AM -0700, Ian Rogers wrote:
> > > > > If an event shows as "<not supported>" in perf stat output, in verbose
> > > > > mode add the strerror output to help diagnose the issue.
> > > > >
> > > > > Consider:
> > > > > ```
> > > > > $ perf stat -e cycles,data_read,instructions true
> > > > >
> > > > > Performance counter stats for 'true':
> > > > >
> > > > > 357,457 cycles:u
> > > > > <not supported> MiB data_read:u
> > > > > 156,182 instructions:u # 0.44 insn per cycle
> > > > >
> > > > > 0.001250315 seconds time elapsed
> > > > >
> > > > > 0.001283000 seconds user
> > > > > 0.000000000 seconds sys
> > > > > ```
> > > > >
> > > > > To understand why the data_read uncore event failed, with this change:
> > > > > ```
> > > > > $ perf stat -v -e cycles,data_read,instructions true
> > > > > Using CPUID GenuineIntel-6-8D-1
> > > > > cycles -> cpu/cycles/
> > > > > data_read -> uncore_imc_free_running_0/data_read/
> > > > > data_read -> uncore_imc_free_running_1/data_read/
> > > > > instructions -> cpu/instructions/
> > > > > Control descriptor is not initialized
> > > > > Warning:
> > > > > kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples
> > > > > Warning:
> > > > > kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples
> > > > > Warning:
> > > > > kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples
> > > > > Warning:
> > > > > data_read:u event is not supported by the kernel.
> > > > > Invalid event (data_read:u) in per-thread mode, enable system wide with '-a'.
> > > > > Warning:
> > > > > kernel.perf_event_paranoid=2, trying to fall back to excluding kernel and hypervisor samples
> > > > > Warning:
> > > > > data_read:u event is not supported by the kernel.
> > > > > Invalid event (data_read:u) in per-thread mode, enable system wide with '-a'.
> > > > > cycles:u: 351621 362833 362833
> > > > > failed to read counter data_read:u
> > > > > failed to read counter data_read:u
> > > > > instructions:u: 156184 362833 362833
> > > > >
> > > > > Performance counter stats for 'true':
> > > > >
> > > > > 351,621 cycles:u
> > > > > <not supported> MiB data_read:u
> > > > > 156,184 instructions:u # 0.44 insn per cycle
> > > > >
> > > > > 0.001584472 seconds time elapsed
> > > > >
> > > > > 0.001811000 seconds user
> > > > > 0.000000000 seconds sys
> > > > > ```
> > > > > where without this change only "data_read:u event is not supported by
> > > > > the kernel." is shown.
> > > >
> > > > I think what you say is:
> > > >
> > > > Before:
> > > > data_read:u event is not supported by the kernel.
> > > >
> > > > After:
> > > > data_read:u event is not supported by the kernel.
> > > > Invalid event (data_read:u) in per-thread mode, enable system wide with '-a'.
> > >
> > > I kept things verbose as unfortunately the
> > > "kernel.perf_event_paranoid=2" is important as is the use of
> > > per-thread mode. Different paranoia levels lead to different errors
> > > and unfortunately a lot of the time the error gets reported as "
> > > data_read:u event is not supported by the kernel." and I'm not sure
> > > all users will get that the key part there is the :u modifier.
> >
> > Yep, I'm ok with the change. But the changelog was a bit unclear what
> > is being added exactly. IIUC we already have the paranoid message with
> > the verbose level 1.
>
> I thought the line:
> """
> where without this change only "data_read:u event is not supported by
> the kernel." is shown.
> """
> covered this?
Yep, I've updated the commit log a little bit and applied to
perf-tools-next.
Thanks,
Namhyung
prev parent reply other threads:[~2025-10-14 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-05 18:14 [PATCH v1] perf stat: Additional verbose details for <not supported> events Ian Rogers
2025-10-08 8:43 ` Namhyung Kim
2025-10-08 16:31 ` Ian Rogers
2025-10-09 5:51 ` Namhyung Kim
2025-10-09 13:31 ` Ian Rogers
2025-10-14 14:04 ` Namhyung Kim [this message]
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=aO5YaR_B8ZYMdHa_@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.