I want to use gprof to optimize my program. But in its output, time is not counted for any function. All the entries for time are 0.0 . My program runs for 50s. My operating system is Mac OSX. I used
g++ -g -pg -o execname cppfiles.... to compile. How should I solve it? Thanks!