3 if test "$1" == "--fresh"; then
7 if test ! -f config-prof.
make; then
11 if test "$fresh" = "yes";
13 .
/configure
--enable-config=prof
--enable-optimising \
14 && perl
-i~
-pe 's/-pipe /-pg -pipe /g' config-prof.
make \
15 && perl
-i~
-pe 's/ -ldl / -pg -ldl /g' config-prof.
make
20 if test "$?" != "0"; then
25 resultdir
=out
/profile-results
32 cat > long-score.ly
<< EOF
34 foo = \new Staff \new Voice \repeat unfold 50 \relative { c4 d8[ d16( e]~ e16[ e e) f] g8 }
48 exe
=$depth/out-prof
/bin
/lilypond
50 ## todo: figure out representative sample.
51 files
="wtk1-fugue2 wtk1-fugue2 wtk1-fugue2 wtk1-fugue2 mozart-hrn-3 mozart-hrn-3 long-score"
55 $exe -ddump-profile --formats=ps
-I $depth/input
/ -I $depth/input
/mutopia
/J.S.Bach
/ \
56 -I $depth/input
/mutopia
/W.A.Mozart
/ \
60 for a
in *.profile
; do
71 ## gprof -s takes forever.
74 $exe -ddump-profile --formats=ps
-I $depth/input
/ -I $depth/input
/mutopia
/J.S.Bach
/ \
75 -I $depth/input
/mutopia
/W.A.Mozart
/ \
79 if test -f gmon.
sum ; then
80 gprof
-s $exe gmon.out gmon.
sum
87 gprof
$exe gmon.
sum > profile