4. fprof - The File Trace Profiler
4 fprof - The File Trace Profiler
fprof
is a profiling tool that can be used to get a picture of how much processing time different functions consumes and in which processes.
fprof
uses tracing with timestamps to collect profiling data. Therfore there is no need for special compilation of any module to be profiled.
fprof
presents wall clock times from the host machine OS, with the assumption that OS scheduling will randomly load the profiled functions in a fair way. Both own time i.e the time used by a function for its own execution, and accumulated time i.e execution time including called functions.
Profiling is essentially done in 3 steps:
1
- Tracing; to file, as mentioned in the previous paragraph.
2
- 登录查看完整内容