Why gprof underestimates total time

[亡魂溺海] 提交于 2020-01-16 04:56:06

问题


I have CPU bound process which runs for 5 hours (CPU time by using getrusage())

I tried to profile it by gprof. The total time main() took is only about 5000s.

My program is CPU bound, it has some disc IO but it is not that significant. Profile interrupts are on, and my process in not multithreaded.


回答1:


It only samples in routines it knows about. You calling new? That's going to spend time in places where gprof doesn't go.

BTW, if you're looking for ways to save some time (after 5 hours I would be) you can do better.



来源:https://stackoverflow.com/questions/9746167/why-gprof-underestimates-total-time

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!