apt-get install python graphviz
pip install gprof2dot
在编译时,使用-pg,
gcc -pg demo.c -o demo
gprof ./demo gmon.out >profile.txt
gprof ./demo | gprof2dot -n0 -e0 | dot -Tpng -o output.png
← 回炉重造C语言 移植x264到RISC-V→