How to install gprof on OS X

zaloo picture zaloo · Mar 25, 2014 · Viewed 14.1k times · Source

I'm trying to use gprof to profile a c++ application I've written but I can't figure out for the life of me how to download and install it. I've googled everything I can think of and can't even find a download link. Someone please help!

Answer

feuGene picture feuGene · Mar 26, 2014

It seems there are two components to gprof. One is a part of the GCC compiler itself, invoked by using the -pg argument. The other is the gprof command, which apparently is part of GNU binutils. I'll leave it to you to figure out how to install GCC and binutils on OSX...