Tag: profiler

是GNU gprof越野车吗?

我有一个C程序通过函数pi_calcPiItem()调用函数pi_calcPiItem() 600000000次。 因此,要分析我使用GNU gprof的函数所花费的时间。 结果似乎是错误的,因为所有调用都归因于main() 。 此外,调用图没有任何意义: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls Ts/call Ts/call name 61.29 9.28 9.28 pi_calcPiItem 15.85 11.68 2.40 pi_calcPiBlock 11.96 13.49 1.81 _mcount_private 9.45 14.92 1.43 __fentry__ 1.45 15.14 0.22 pow 0.00 15.14 0.00 600000000 0.00 0.00 main Call graph granularity: […]