Installing Herbgrind

Herbgrind depends on Valgrind, a binary instrumentation and memory analysis framework. To install Herbgrind, you must first install a C compiler and GNU awk and sed.

Herbgrind is α software. It is currently known to work only on 64-bit GNU Linux platforms. Support for 32-bit architectures, for OS X, for Clang, and for BSD core tools is still in progress. Please file a bug if Herbgrind does not work on your system.

Installing GNU AWK and Sed

Herbgrind currently supports 64-bit GNU Linux with GCC; OS X has known bugs, and other configurations are untested. On Linux, install GCC, AWK, and Sed using distro-provided packages; on Debian-derivatives, use the build-essentials pacakge:

sudo apt-get install build-essentials

On OS X, the same tools can be installed using Homebrew:

brew install gawk
brew install gnu-sed --with-default-names
brew install gcc

You will also want the XCode Command-line Tools on OSX, which you can install with:

xcode-select --install

Installing Herbgrind

Once the GNU tools are installed, download the Herbgrind source from GitHub with:

git clone

If you go to the herbgrind directory, you should see a file, a directory named herbgrind, a directory named bench/, and a variety of other directories. You should also see a Makefile. Make the binary with:

make compile

This command will take approximately ten minutes to run for the first time, since it will download and build a custom Valgrind fork. You may want to set the following Make variables;

The platform you want to run Herbgrind on; the default is amd64-darwin on OS X and amd64-linux otherwise.
The primary and secondary architecture versions, which you will want to set for some 64+32-bit configurations. The default is amd64 primary and no secondary.

You can also configure without compiling using make setup.

Once Herbgrind is installed and working correctly, check out the usage instructions.