Open vjpr opened 2 years ago
Is this supposed to be different from normal wsl?
WSL2 is an actual VM, not just a Linux/POSIX compatibility layer like WSL1 was.
You'll need WSL2 version 0.50.2 or later. If you're on Windows 10 you'll have to get that from the store IIRC. You also need to configure the VMM to enable hardware performance counters like so https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/performance-monitoring-hardware
FYI: Hardware counters in WSL2 just landed:
https://github.com/microsoft/WSL/issues/4678#issuecomment-1318579235
I think that can be closed, no?
An issue to track ability to run on Bootcamp on Apple Intel hardware.
Setup
https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#2-install-wsl
Install perf
See: https://stackoverflow.com/a/65276025/130910
Test
Open PowerShell in Administrator mode.
Create a sample program to debug
multiple.c
``` #includeFails to run:
Check perf events supported
This seems to indicate that they are not.
Status
See: Support hardware performance counters - WSL2 - https://github.com/microsoft/WSL/issues/4678
Also: State of hardware performance monitoring in WSL2 - https://github.com/microsoft/WSL/issues/8480
No one seems to have got it working so far.
Potential fixes
Update custom Microsoft Linux kernel version for wsl2
5.10 to 5.15 (latest longterm - see https://www.kernel.org/)
Pending issue on wsl repo: https://github.com/microsoft/WSL/issues/8507
Doesn't seem to work
Try Windows 11
NOTE: Not compatible with Apple Intel hardware.
Doesn't seem to work