How to Install perf-tools on Windows 10

Perf-tools is a collection of performance analysis tools for Linux systems developed by Brendan Gregg. However, with the help of the Windows Subsystem for Linux (WSL), it's possible to install and use perf-tools on Windows 10. In this tutorial, we'll guide you through the installation process.

Prerequisites

Before we get started, make sure you have the following items:

Steps

  1. Open a Linux terminal by launching the WSL instance of your choice. You can do this by searching for "WSL" in the Windows start menu and selecting your preferred distribution.

  2. Clone the perf-tools repository from GitHub using the following command:

    git clone https://github.com/brendangregg/perf-tools.git
    

    This will create a perf-tools directory in your current location.

  3. Navigate to the newly created perf-tools directory by running:

    cd perf-tools
    
  4. Install necessary dependencies by running:

    sudo apt-get install -y make gcc libelf-dev
    
  5. Build and install perf-tools by running:

    make && sudo make install
    

    This will compile the perf tool and install it in /usr/local/bin/.

  6. Test that perf is installed and working by running:

    perf top
    

    If you see the profile of the system's top CPU-consuming processes as output, then perf is working correctly.

Conclusion

That's it! You've successfully installed perf-tools on Windows 10 using WSL. With perf installed, you can now use it to analyze the performance of your Linux subsystem running on your Windows machine.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!