I would like to install GNU Profiler (gprof) on Mac. I tried to install binutils using Homebrew; however, the package that Homebrew installs from the following address does not have gprof.


According to binutils website, it should have gprof in it.


Any suggestion for installing gprof is welcome.

1 Answer 1


If you run brew install -v binutils, you will see this output flying by:

*** This configuration is not supported in the following subdirectories:
     ld gas gprof
     (Any other directories should still work fine.)

In configure.ac there is

  noconfigdirs="$noconfigdirs ld gas gdb gprof"
  noconfigdirs="$noconfigdirs sim target-rda"

So, gprof is not supported on OS X.

I think the preferred profiling tool is DTrace.

  • Thanks. Any other solution to get gprof to work?
    – Javad
    Nov 2, 2014 at 17:33
  • @Javad do have any solution to gprof to work on OS X?
    – Mohan
    Apr 1, 2016 at 11:25
  • @Mohan Not really, I gave up on this.
    – Javad
    Apr 3, 2016 at 5:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .