4

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.

http://ftpmirror.gnu.org/binutils/binutils-2.24.tar.gz

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

http://www.gnu.org/software/binutils/

Any suggestion for installing gprof is welcome.

1 Answer 1

3

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

*-*-darwin*)
  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.

3
  • Thanks. Any other solution to get gprof to work?
    – Javad
    Commented Nov 2, 2014 at 17:33
  • @Javad do have any solution to gprof to work on OS X?
    – Mohan
    Commented Apr 1, 2016 at 11:25
  • @Mohan Not really, I gave up on this.
    – Javad
    Commented 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 .