Open
Description
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 run sudo ./perf stat -d ls
I get the following output:
Performance counter stats for 'ls':
1.76 msec task-clock # 0.730 CPUs utilized
0 context-switches # 0.000 K/sec
0 cpu-migrations # 0.000 K/sec
108 page-faults # 0.061 M/sec
<not supported> cycles
<not supported> instructions
<not supported> branches
<not supported> branch-misses
<not supported> L1-dcache-loads
<not supported> L1-dcache-load-misses
<not supported> LLC-loads
<not supported> LLC-load-misses
0.002411486 seconds time elapsed
0.002558000 seconds user
0.000000000 seconds sys
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] #329 (comment)