Posted on 2012-07-16 18:03
Milo的海域 阅读(327)
评论(0) 编辑 收藏 所属分类:
Linux
assume gprof and gprof2dot.py, graphviz be installed.
1. checkout memcached src code from git server
2. sh autogen.sh & ./configure
3. modify Makefile about CFLAGS, append option '-pg', after that do make
4. run memcached & do some actions by telnet
5. terminate memcached process, a gmon.out file will be generated.
6. gprof memcached gmon.out | /usr/bin/gprof2dot.py -n0 -e0 -c bw | dot -Tpng -o memcached_callgraph.png