Re: [請益] perl的call graph做法or工具

看板Perl作者時間11年前 (2013/11/06 23:49), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《kotou (Eddie)》之銘言: : 各位大大好 : 因為小弟研究的關係,所以有很多程式碼要分析 : 小弟先前有問過如何用perl寫C/C++的call graph : 之後是使用cflow這款工具,配合system函式執行 : 大量輸出每隻程式的function call : 目前想要分析perl的程式碼 : 我有上網找資料 : 但大多都是要在分析的程式碼內引用特定的模組 : 我希望能夠另外寫一隻程式以讀檔的方式產生perl的call graph : 想請問各位大大,有沒有寫過或用過可以產生perl的call graph的工具 : 或是有寫過可以給我一些提點 : 非常謝謝各位的幫助 推薦 NYTProf + kcachegrind 執行方法: # profile code and write database to ./nytprof.out perl -d:NYTProf some_perl_script.pl # Convert an NYTProf profile into Callgrind format nytprofcg --file=nytprof.out --out=nytprof.callgrind 產生 nytprof.callgrind 檔案 之後可以用 kcachegrind 看 GUI 分析 http://kcachegrind.sourceforge.net/html/Home.html Call Graph 範例: http://kcachegrind.sourceforge.net/html/CallGraph.html -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.195.8.21
文章代碼(AID): #1IUcKUnj (Perl)
討論串 (同標題文章)
文章代碼(AID): #1IUcKUnj (Perl)