Changes between Version 1 and Version 2 of jazz/11-03-31


Ignore:
Timestamp:
Mar 31, 2011, 10:52:43 AM (13 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/11-03-31

    v1 v2  
    66   * Rex 在 [http://people.debian.org.tw/~chihchun/2011/03/30/callgraphviz/ CallGraphviz – call graph visualzer based on csope, graphviz and xdot] 一文中介紹了許多不同的 callgraph 產生方式。
    77   * 搭配[http://en.wikipedia.org/wiki/Call_graph 維基百科 Call_graph]的軟體簡介,大概整理如下:
    8    * [http://www.skynet.ie/~mel/projects/codeviz/ CodeViz] - "Static Analysis" - 缺點:必須 patch GCC 然後用 Perl 來產生圖形
     8   * [http://www.skynet.ie/~mel/projects/codeviz/ CodeViz] - 缺點:必須 patch GCC 然後用 Perl 來產生圖形
    99   * [http://students.ceid.upatras.gr/~sxanth/ncc/ ncc] - 目標是取代 cflow 跟 cscope,[http://blog.linux.org.tw/~jserv/archives/001723.html jserv 有介紹過] - 缺點:相依 GCC 環境版本
    1010     * 有 [http://packages.debian.org/ncc Debian 套件 ncc]
     
    1616     * [http://code.google.com/p/seascope/ seascope] - A pyQt GUI front-end for cscope - pyQt 寫的 cscope 圖形介面
    1717     * [http://sourceforge.net/projects/kscope/ kscope] - A source-code browsing, analysis and editing environment for large C projects. - KDE 版本的 cscope 圖形介面 - 有 [http://packages.debian.org/kscope Debian 套件 kscope]
     18   * [http://kcachegrind.sourceforge.net/ KCachegrind] - Profiling Visualization - 這個工具是搭配 Valgrind 這個 Profiler 可以在 runtime 產生 callgrah
     19   * [http://code.google.com/p/jrfonseca/wiki/Gprof2Dot Gprof2Dot] - 也是透過 profiler 產生的輸出來作視覺化動作,最初是支援 gprof 現在已經支援更多不同 profiler 了。
     20   * [http://www.gson.org/egypt/ egypt] - 用 Perl 寫的
     21 * Python
     22   * [http://pycallgraph.slowchop.com/ pycallgraph] - Python Call Graph
     23 * Bash
     24   * 我一直想找的是 Bash 的遞迴式 callgraph 產生器,雖然 Bash 可以加入 -X 參數來做 runtime 除錯,不過還沒有找到可以查出多層該怎麼追。
     25   * [http://bashdb.sourceforge.net/ bashdb] - BASH Debugger - 可以用類似 GDB 的指令來 DEBUG Bash
     26   * shprof - a line profiler for shell scripts
     27     * [http://dev.gentoo.org/~dberkholz/scripts/shprof 原始碼]
     28   * 這邊有一招是蠻好玩的,居然只要設定 PS4 環境變數就可以秀出每個呼叫的開始時間。(這算是 bash 的簡易版 profiler 嘛?) [http://www.myunitsconverter.com/thread/885124/time%20profiling%20a%20linux%20command%20or%20script <參考討論> time profiling a linux command or script]
     29{{{
     30Least invasive you may want to play with some variant of...
     31
     32set -x
     33PS4='$( date ): '
     34sleep 1
     35sleep 3
     36sleep 2
     37exit 0
     38
     39which produces timestamps in front of the commands...
     40
     41Mon Mar 17 02:39:35 CET 2008: PS4='$( date ): '
     42Mon Mar 17 02:39:35 CET 2008: sleep 1
     43Mon Mar 17 02:39:36 CET 2008: sleep 3
     44Mon Mar 17 02:39:39 CET 2008: sleep 2
     45Mon Mar 17 02:39:41 CET 2008: exit 0
     46}}}