gprof工具简介
gprof为gnu profiler,用于分析程序性能信息文件,从中得到程序中的函数调用栈及被调函数耗时(也支持统计语句级别的耗时),指出程序中耗时的部分所在,辅助进行程序性能优化
gprof用户手册
Profiling has several steps:
- You must compile and link your program with profiling enabled. See Compiling.
- You must execute your program to generate a profile data file. See Executing.
- You must run
gprof
to analyze the profile data. See Invoking.
使用方式概述
-
使用gprof分析程序性能时ÿ