gprof reports no time accumulated

后端 未结 7 702
暗喜
暗喜 2020-12-03 13:51

I\'m trying to profile a C++ application with gprof on a machine running OSX 10.5.7. I compile with g++ in the usual way, but using -pg flags, run the application and try to

7条回答
  •  时光说笑
    2020-12-03 14:16

    the precision of time in gprof is 0.00. so maybe your module taking less time (milli sec/micro sec).Hence, it will show 0.00 and no time accumulated.So, run the whole program about 1000/1000000 times so that it will come to seconds.At last, divide obtained time with your looping factor (1000/1000000) and that going to be your processing time. I too faced the same problem and by doing this it gets solved.

提交回复
热议问题