[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAP-5=fVE4VTtB23CHF2rSwm=0RM4Y=iVEJJYiYD9OLJLQQfaVg@mail.gmail.com>
Date: Mon, 25 Nov 2024 23:36:37 -0800
From: Ian Rogers <irogers@...gle.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Sasha Levin <sashal@...nel.org>, Linus Torvalds <torvalds@...ux-foundation.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Kan Liang <kan.liang@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org
Subject: Re: [GIT PULL] perf-tools changes for v6.13
On Mon, Nov 25, 2024 at 6:53 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> Hello,
>
> On Mon, Nov 25, 2024 at 02:07:33PM -0500, Sasha Levin wrote:
> > On Sun, Nov 24, 2024 at 11:16:53PM -0800, Namhyung Kim wrote:
> > > Hi Linus,
> > >
> > > Please consider pulling the following changes in perf tools for v6.13.
> > >
> > > Thanks,
> > > Namhyung
> > >
> > >
> > > The following changes since commit 59b723cd2adbac2a34fc8e12c74ae26ae45bf230:
> > >
> > > Linux 6.12-rc6 (2024-11-03 14:05:52 -1000)
> > >
> > > are available in the Git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git tags/perf-tools-for-v6.13-2024-11-24
> >
> > Hey Namhyung,
> >
> > After merging this PR into linus-next, the "Simple expression parser"
> > test has started failing:
> >
> > --- start ---
> > test child forked, pid 292
> > Using CPUID GenuineIntel-6-1A-3
> > division by zero
> > syntax error
> > Failed to find TSC frequency in /proc/cpuinfo
> > FAILED tests/expr.c:250 #system_tsc_freq > 0
> > ---- end(-1) ----
> > 7: Simple expression parser : FAILED!
> >
> > Here's a full log of the run: https://qa-reports.linaro.org/lkft/sashal-linus-next/build/v6.11-24716-gab16e9af2ff9/testrun/26045681/suite/perf/test/_7_Simple_expression_parser/log
>
> Thanks for the report, I'll take a look.
I suspect this is a side effect of the tool PMU refactoring where the
expr double values were changed to u64 counter like values:
https://lore.kernel.org/lkml/20241002032016.333748-8-irogers@google.com/
The CPU model matches nehalemep:
```
$ python tools/perf/pmu-events/models.py x86 GenuineIntel-6-1A-3
tools/perf/pmu-events/arch/
nehalemep
```
so the tsc frequency should be determined via /proc/cpuinfo looking
for "model name ... @ %lfGHz":
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/arch/x86/util/tsc.c?h=perf-tools-next#n44
The logs make the machine look like an emulator (reference to bochs)
so I wonder if the cpuinfo is incorrect. Why the switch from double to
u64 would show this problem I'm not sure, perhaps a latent bug was
exposed in the test as previously NaN would be returned which does
interesting things with comparisons. The test is expecting on an Intel
x86 it should be able to compute the TSC frequency and assuming the
cpuinfo is lacking the "@ ...GHz" then the test could be working as
intended.
Thanks,
Ian
Powered by blists - more mailing lists