08/04/09 01:03:42 iVSQr/6n
ところで、ヘルプに書くのをすっかり忘れてましたが、--enable-gprof というconfigureオプションがあります。
するとURLリンク(jd4linux.sourceforge.jp)のような解析をおこなえます。
ヘルプには次のように書きました。
-----------------------------------
gprofによるプロファイリングを行う場合は ./configure --enable-gprof とする
コンパイルオプションに -pg が付き、JDを実行すると gmon.out が出来るので gprof ./jd gmon.out で解析できる。
ただしCPUの最適化は効かなくなるので注意する。
-----------------------------------
ちなみに最新のtrunkで10分位動かした後の結果は次のような感じです。
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls ms/call ms/call name
30.77 0.20 0.20 2605 0.08 0.08 DBTREE::BoardBase::get_article(std::string const&)
7.69 0.25 0.05 35088 0.00 0.00 ARTICLE::DrawAreaBase::layout_one_text_node(ARTICLE::LAYOUT*, int&, int&, int&, int)
7.69 0.30 0.05 826 0.06 0.06 DBTREE::Root::is_moved(std::string const&, std::string const&, std::string const&, DBTREE::BoardBase**)
6.15 0.34 0.04 2206 0.02 0.02 DBTREE::NodeTreeBase::check_id_name(int)
4.62 0.37 0.03 6933 0.00 0.01 DBTREE::NodeTreeBase::parse_html(char const*, int, int, bool, bool, bool)
3.85 0.40 0.03 169852 0.00 0.00 DBTREE::BoardBase::equal(std::string const&)