MacOS에서 Gprof 결과 시각화 하는법

853 단어 gprofMacOSMacOS

목적

단말에서 실행한 gprof 결과 txt 파일을 내 맥(로컬)에서 시각화 하고싶다.

설치

brew install gprof2dot
brew install graphviz

실행

Create Call graph

$ gprof2dot result.txt > report.dot

Visualize call graph

$ dot -Tpng -oreport.png report.dot

그런데, 시각화했더니 결과가 네모상자 한두개만 나온다고 하면, 다음을 이용한다.

$ gprof2dot -n0 -e0 result.txt > report.dot
$ dot -Tpng -oreport.png report.dot

참고 사이트:
* https://github.com/jrfonseca/gprof2dot

좋은 웹페이지 즐겨찾기