If you’re reading this, you probably already know what pin is for, but basically it is used to profile programs. You can use it to answer things like how many instructions does this executable have or how many branches occur, etc. It does this in most cases by inserting counters and other code while your executable is running. So let’s get to a quick demo.
I will be demonstrating with Linux, specifically with Ubuntu, because this was a headache on Windows. Note that you might need root permission to execute some of these commands, so if they don’t work, try re-running with sudo.