It appears your Makefile script encounters an error when executing the "perf" target on a Windows Subsystem for Linux (WSL) environment using a specific Linux kernel (5.15.146.1-microsoft). The error message suggests that the necessary tools for running perf are not installed for your current Linux kernel version.
-
Install the Necessary Perf Tools:
You need to install the Linux tools that are compatible with your current kernel version on WSL. The error message points you towards specific packages that might be missing. You can install the necessary tool(s) using your package manager. For Ubuntu (or Ubuntu based distributions), you can try:
sudo apt-get update
sudo apt-get install linux-tools-$(uname -r) linux-cloud-tools-$(ename -r)
If that doesn’t work because the package is not available for your specific kernel, try installing the general tools package:
sudo apt-get install linux-tools-generic linux-cloud-tools-generic
Note that the exact package names might vary based on the Linux distribution and the version you are using in WSL.
-
Verify Installation:
After installation, verify that perf is correctly installed by running:
perf --version
This should return the version of perf installed.
-
Modify the Makefile (if necessary):
If the perf tool still doesn’t work, you may need to adjust the PERF_FLAGS in the Makefile to match the capabilities of the perf installation on your system. Check the available events with:
perf list
This command shows all available events for perf on your system. Update the PERF_FLAGS variable in your Makefile to ensure you're using supported performance counters.
-
Re-run Makefile:
After installing the necessary tools and making any required adjustments, try running your Makefile again:
make fullcheck
-
Check for Additional Dependencies:
If installing perf does not resolve the issue, ensure all other dependencies mentioned in your Makefile, like clang-format, valgrind, and cppcheck, are also installed and configured correctly.
-
Environment Specifics:
Remember, WSL might have specific limitations or may require specific versions of tools because of how it interacts with the Windows host kernel. Check the WSL documentation for any other specific requirements or limitations related to performance monitoring tools.
If perf still doesn't work, consider running your tests on a native Linux environment where perf support is typically more robust, or check online communities and forums for advice specific to WSL environments.
By following these steps, you should be able to resolve issues related to the use of perf in your Makefile as executed in the WSL environment.