http://vast.uccs.edu/~tboult/CS330/NOTES/profilers.ppt
#for timing
gprof
ex.
compile with -pg parameter
run program once, gmon.out is generated
gprof
#for memory
valgrind
http://www.lrz-muenchen.de/services/software/programmierung/valgrind/
http://www.network-theory.co.uk/docs/valgrind/
- memcheck: memory leakage checking
ex.
valgrind --tool=memcheck --leak-check=yes
- callgrind/cachegrind: simulating instruction usage/cache hit, miss
ex.
valgrind --tool=callgrind
callgrind_annotate
- massif: analyze stack and heap usage, simple memory profiler
ex.
valgrind --tool=massif
see the ps file
沒有留言:
張貼留言