linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Edward Baker <edward.baker@intel.com>
Subject: Re: [PATCH v1 1/4] perf vendor events intel: Alderlake/rocketlake metric fixes
Date: Thu, 4 Jan 2024 17:37:05 -0300	[thread overview]
Message-ID: <ZZcW8Zk02wPbpXJI@kernel.org> (raw)
In-Reply-To: <CAP-5=fV+U4qSwU8nqHJMgAZTwtWs9jEm3i9yDQSVtq9Fbos5HA@mail.gmail.com>

Em Thu, Jan 04, 2024 at 05:56:22AM -0800, Ian Rogers escreveu:
> On Thu, Jan 4, 2024 at 4:39 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Wed, Jan 03, 2024 at 11:42:56PM -0800, Ian Rogers escreveu:
> > > Fix that the core PMU is being specified for 2 uncore events. Specify
> > > a PMU for the alderlake UNCORE_FREQ metric.
<SNIP>
> > 101: perf all metricgroups test                                      : Ok
> > 102: perf all metrics test                                           : FAILED!
> > 107: perf metrics value validation                                   : Ok

> > 102 is now failing due to some other problem:

> > root@number:~# perf test -v 102
> > 102: perf all metrics test                                           :
> > --- start ---
> > test child forked, pid 2701034
> > Testing tma_core_bound
> > Testing tma_info_core_ilp
<SNIP>
> > Testing tma_memory_fence
> > Metric 'tma_memory_fence' not printed in:
> > # Running 'internals/synthesize' benchmark:
> > Computing performance of single threaded perf event synthesis by
> > synthesizing events on the perf process itself:
> >   Average synthesis took: 49.458 usec (+- 0.033 usec)
> >   Average num. events: 47.000 (+- 0.000)
> >   Average time per event 1.052 usec
> >   Average data synthesis took: 53.268 usec (+- 0.027 usec)
> >   Average num. events: 244.000 (+- 0.000)
> >   Average time per event 0.218 usec

> >  Performance counter stats for 'perf bench internals synthesize':

> >      <not counted>      cpu_core/TOPDOWN.SLOTS/                                                 (0.00%)
> >      <not counted>      cpu_core/topdown-retiring/                                              (0.00%)
> >      <not counted>      cpu_core/topdown-mem-bound/                                             (0.00%)
> >      <not counted>      cpu_core/topdown-bad-spec/                                              (0.00%)
> >      <not counted>      cpu_core/topdown-fe-bound/                                              (0.00%)
> >      <not counted>      cpu_core/topdown-be-bound/                                              (0.00%)
> >      <not counted>      cpu_core/RESOURCE_STALLS.SCOREBOARD/                                        (0.00%)
> >      <not counted>      cpu_core/EXE_ACTIVITY.1_PORTS_UTIL/                                        (0.00%)
> >      <not counted>      cpu_core/EXE_ACTIVITY.BOUND_ON_LOADS/                                        (0.00%)
> >      <not counted>      cpu_core/MISC2_RETIRED.LFENCE/                                          (0.00%)
> >      <not counted>      cpu_core/CYCLE_ACTIVITY.STALLS_TOTAL/                                        (0.00%)
> >      <not counted>      cpu_core/CPU_CLK_UNHALTED.THREAD/                                        (0.00%)
> >      <not counted>      cpu_core/ARITH.DIV_ACTIVE/                                              (0.00%)
> >      <not counted>      cpu_core/EXE_ACTIVITY.2_PORTS_UTIL,umask=0xc/                                        (0.00%)
> >      <not counted>      cpu_core/EXE_ACTIVITY.3_PORTS_UTIL,umask=0x80/                                        (0.00%)

> >        1.177929044 seconds time elapsed

> >        0.434552000 seconds user
> >        0.736874000 seconds sys
> > Testing tma_port_1
<SNIP>
> > test child finished with -1
> > ---- end ----
> > perf all metrics test: FAILED!
> > root@number:~#

> Have a try disabling the NMI watchdog. Agreed that there is more to

Did the trick, added this to the cset log message:

--------------------------------------- 8< ----------------------------
Test 102 is failing for another reason, not being able to get as many
counters as needed, Ian Rogers suggested disabling the NMI watchdog to
have more counters available:

  root@number:/home/acme# cat /proc/sys/kernel/nmi_watchdog
  1
  root@number:/home/acme# echo 0 > /proc/sys/kernel/nmi_watchdog
  root@number:/home/acme# perf test 102
  102: perf all metrics test                                           : Ok
  root@number:/home/acme#
--------------------------------------- 8< ----------------------------

- Arnaldo

> fix here but I think the PMU driver is in part to blame because
> manually breaking the weak group of events is a fix. Fwiw, if we
> switch to the buddy watchdog mechanism then we'll no longer need to
> disable the NMI watchdog:
> https://lore.kernel.org/lkml/20230421155255.1.I6bf789d21d0c3d75d382e7e51a804a7a51315f2c@changeid/

  parent reply	other threads:[~2024-01-04 20:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04  7:42 [PATCH v1 1/4] perf vendor events intel: Alderlake/rocketlake metric fixes Ian Rogers
2024-01-04  7:42 ` [PATCH v1 2/4] perf vendor events intel: Update emeraldrapids events to v1.02 Ian Rogers
2024-01-04  7:42 ` [PATCH v1 3/4] perf vendor events intel: Update icelakex events to v1.23 Ian Rogers
2024-01-04  7:42 ` [PATCH v1 4/4] perf vendor events intel: Update sapphirerapids events to v1.17 Ian Rogers
2024-01-04 12:39 ` [PATCH v1 1/4] perf vendor events intel: Alderlake/rocketlake metric fixes Arnaldo Carvalho de Melo
2024-01-04 13:56   ` Ian Rogers
2024-01-04 14:30     ` Liang, Kan
2024-01-04 17:51       ` Ian Rogers
2024-01-04 19:30         ` Liang, Kan
2024-01-04 23:31           ` Ian Rogers
2024-01-04 20:37     ` Arnaldo Carvalho de Melo [this message]
2024-01-04 14:23 ` Liang, Kan

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=ZZcW8Zk02wPbpXJI@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=edward.baker@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --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).