1. CPU profilter
1. 1 gprof, Valgrind and gperftools - an evaluation of some tools for application level CPU profiling on Linux
1.2 List of performance analysis tools
2. Valgrind
- memory leak profiling: $ valgrind ./sample
- cache profileing: $ valgrind --tool==cachegrind ./sample
- function profiling: $ valgrind --tool==callgrind ./sample
- kcachegrind (GUI tool)
3. gprof
- WIKI
- tutorial: https://www.thegeekstuff.com/2012/08/gprof-tutorial/
- What is gprof?
- How to install and use profiling tool Gprof on Linux
- GPROF Tutorial
To write the gmon.out file properly, your program must exit normally. _exit()
Call graph: gprof2dot
- gprof Quick-Start Guide
- use the makefile (edit CFLAGS / FFLAGS first) or call compiler at the shell
- required flags for profiling: -pg -g
- try with and without inlining: -finline / -fno-inline
4. gprof2dot
No comments:
Post a Comment