I want to use something like gprof to profile C / C ++ programs on the command line. But, unfortunately, gprof for some reason does not work on OS X (this is a known issue).
When I search for this topic on the Internet, almost everyone recommends Instructions.app. Since my workflow is completely in the command line environment, I really don't want to switch to the GUI just for some profiling.
So, is there currently a useful gprof alternative for OS X that is purely a command line?
Change More specifically, I want to use a tool to analyze the execution time of each function in my program to find out the hot spots.
source share