Open christian-vorhemus opened 2 years ago
Yeah we have a backlog item to add additional perf counters, but unfortunately there isn't a great API to query if the host supports them. It's something we're looking into.
@benhillis any update on this?
@benhillis any update on this?
the lastest kernel's condition works like this, but still not support llc, It need more work to finish it
+1 on LLC metrics..
getting on Zen4:
7209 branch-misses:u # 6.49% of all branches
<not counted> L1-dcache-loads:u (0.00%)
<not counted> L1-dcache-load-misses:u (0.00%)
<not supported> LLC-loads:u
<not supported> LLC-load-misses:u
I used this sudo apt install linux-tools-generic
/usr/lib/linux-tools/5.15.0-112-generic/perf stat ls ............ .......... .............
Performance counter stats for 'ls':
2.11 msec task-clock:u # 0.762 CPUs utilized
0 context-switches:u # 0.000 /sec
0 cpu-migrations:u # 0.000 /sec
117 page-faults:u # 55.508 K/sec
1660148 cycles:u # 0.788 GHz
123771 stalled-cycles-frontend:u # 7.46% frontend cycles idle
389595 stalled-cycles-backend:u # 23.47% backend cycles idle
1856800 instructions:u # 1.12 insn per cycle
# 0.21 stalled cycles per insn
400912 branches:u # 190.204 M/sec
15016 branch-misses:u # 3.75% of all branches
0.002766014 seconds time elapsed
0.000285000 seconds user
0.000000000 seconds sys
I hope this might help
I read mixed signals [1] [2] to which extent we can access the Performance Monitoring Unit by using the
perf
command. I cloned and compiled the perf tool present in https://github.com/microsoft/WSL2-Linux-Kernel and when I runsudo ./perf stat -d ls
I get the following output:Especially getting the cache misses would be interesting for my use case. Is it expected that measures like cycles, LLC-loads are "not supported" in WSL2 or did I do something wrong? If the former, is support for it planned?
[1] https://stackoverflow.com/questions/60237123/is-there-any-method-to-run-perf-under-wsl#comment125398632_60276918 [2] https://github.com/microsoft/WSL/issues/329#issuecomment-564461721