研究日誌。

大規模なグラフ処理に対してメモリ階層構造を考慮した高性能なソフトウェアを開発。

gprof でプロファイル2。

2007-11-27 01:59:30 | Weblog
static リンクするとどうなるかとコメントを頂いたので、さっそく。
ライブラリを静的にリンクすることになるので、
数十 Kbyte のバイナリが 600 KByte ほどに。

静的にリンクしたことで、fscanf 等の関数までプロファイルすることができるようである。(?)_IO_vfscanf_internal は fscanf() のことを指していると思われるが、
fscanf() でグラフデータを格納しているので、33%弱というのは納得がいく。 

%   cumulative   self              self     total time   seconds   seconds    calls   s/call   s/call  name 
35.02     22.72    22.72       10     2.27     4.03  DijkstraWithBinTreeP2P
21.95     36.97    14.25                             _IO_vfscanf_internal
20.71     50.41    13.44 128723320     0.00     0.00  BinTreeInsert 
 8.34     55.82     5.41                             ____strtol_l_internal
 4.68     58.85     3.04 120640933     0.00     0.00  BinTreeGetMinNode
 1.57     59.87     1.02  8029936     0.00     0.00  BinTreeDeleteNode
 1.13     60.60     0.73                             cfree
 1.07     61.30     0.70                             _IO_sputbackc
 1.06     61.99     0.69                             _int_free
 0.91     62.58     0.59                             __read_nocancel
 0.87     63.14     0.57                             malloc
 0.82     63.67     0.53                             _int_malloc
 0.51     64.00     0.33        1     0.33     0.33  ReadSortedGr
 0.23     64.15     0.15                             __getclktck
 0.22     64.30     0.15                             fscanf
 0.18     64.41     0.12                             __profile_frequency
 0.15     64.51     0.10                             _IO_default_seekoff
 0.11     64.58     0.07                             __secure_getenv
 0.11     64.65     0.07                             __strtol_internal
 0.06     64.69     0.04                             munmap
 0.06     64.73     0.04                             realloc_check  
 0.06     64.77     0.04                             strtoul
 0.05     64.80     0.04       10     0.00     0.00  BinTreeFree
 0.05     64.83     0.03                             mallopt
 0.04     64.86     0.03                             printf
 0.02     64.87     0.01                             _IO_file_underflow
 0.02     64.88     0.01                             __uflow
 0.01     64.88     0.01                             calloc
 0.01     64.89     0.01                             dprintf
 0.00     64.89     0.00       22     0.00     0.00  GetRusageSec
 0.00     64.89     0.00       10     0.00     0.00  BinTreeFree2
 0.00     64.89     0.00       10     0.00     0.00  BinTreeInit
 0.00     64.89     0.00        1     0.00     0.00  GraphFree
 0.00     64.89     0.00        1     0.00     0.00  GraphMalloc
 0.00     64.89     0.00        1     0.00     0.00  QueryFree 
 0.00     64.89     0.00        1     0.00     0.00  QueryMalloc
 0.00     64.89     0.00        1     0.00     0.00  ReadDimacsQueryP2P
 0.00     64.89     0.00        1     0.00    40.58  main

最新の画像もっと見る

コメントを投稿