Re: [PATCH v1] perf test expr: Fix system_tsc_freq for only x86

From
Namhyung Kim <namhyung@kernel.org>
Date
2024-12-05 18:49:57
Also in
linux-perf-users, lkml
Reply to
Ian Rogers, 2024-12-05
On Wed, Dec 04, 2024 at 11:09:50PM -0800, Ian Rogers wrote:
On Wed, Dec 4, 2024 at 10:33 PM Ian Rogers [off-list ref] wrote:
quoted
On Wed, Dec 4, 2024 at 9:47 PM Namhyung Kim [off-list ref] wrote:
quoted
Hi Ian,

On Wed, Dec 04, 2024 at 06:23:05PM -0800, Ian Rogers wrote:
quoted
The refactoring of tool PMU events to have a PMU then adding the expr
literals to the tool PMU made it so that the literal system_tsc_freq
was only supported on x86. Update the test expectations to match -
namely the parsing is x86 specific and only yields a non-zero value on
Intel.

Fixes: 609aa2667f67 ("perf tool_pmu: Switch to standard pmu functions and json descriptions")
Reported-by: Athira Rajeev <redacted>
Closes: https://lore.kernel.org/linux-perf-users/20241022140156.98854-1-atrajeev@linux.vnet.ibm.com/ (local)
Co-developed-by: Athira Rajeev <redacted>
Signed-off-by: Ian Rogers <irogers@google.com>
It failed on my VM.

  root@arm64-vm:~/build# ./perf test -v 7
  --- start ---
  test child forked, pid 2096
  Using CPUID 0x00000000000f0510
  division by zero
  syntax error
  Unrecognized literal '#system_tsc_freq'FAILED tests/expr.c:253 #system_tsc_freq == 0
  ---- end(-1) ----
    7: Simple expression parser                                        : FAILED!
I'll need to check this. The test is looking for parsing failures, so
it's confusing to me expr__parse is returning 0. I was testing on x86
but disabling the literal in the tool PMU.
Hmm.. perhaps you had a similar issue to me and that b4 silently
failed as git user.email/user.name weren't configured? When I test on
No, I confirmed it's appplied.  Maybe my VM setting has some problem.
After reboot + rebuild it works now, sorry for the noise.

Thanks,
Namhyung

a raspberry pi 5:
$ uname -a
Linux raspberrypi 6.6.51+rpt-rpi-2712 #1 SMP PREEMPT Debian
1:6.6.51-1+rpt3 (2024-10-08) aarch64 GNU/Linux
$ git log -1 --oneline
94733a0e50fd (HEAD -> ptn-expr-test) perf test expr: Fix
system_tsc_freq for only x86
$ /tmp/perf/perf test expr -v
Couldn't bump rlimit(MEMLOCK), failures may take place when creating
BPF maps, etc
  7: Simple expression parser                                        : Ok
Thanks,
Ian
  
Thread (10 messages) 10 messages, 4 authors, last reply 2024-12-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help