6 # This script creates all.Counts file that can be fed to prof(1)
7 # to produce various basic block counting profiles.
9 # This script needs to be run at the top level of the Perl build
10 # directory after the "make all" and "make test" targets have been run.
12 # You will also need to have perl.pixie built,
13 # which means that you will also have Configured with -Doptimize=-g.
15 # After the script has been run (this will take several minutes)
16 # you will have a file called all.Counts, which contains the cumulative
17 # basic block counting results over the whole Perl test suite.
18 # You can produce various reports using prof(1);
20 # prof -pixie -all -L. perl all.Counts
21 # prof -pixie -heavy -all -L. perl all.Counts
22 # prof -pixie -invocations -all -L. perl all.Counts
23 # prof -pixie -lines -all -L. perl all.Counts
24 # prof -pixie -testcoverage -all -L. perl all.Counts
25 # prof -pixie -zero -all -L. perl all.Counts
27 # io/openpid and op/fork core on me, I don't know why and haven't
33 if test ! -f /usr/bin/atom
35 echo "$0: no /usr/bin/atom"
39 if test ! -f perl; then echo "$0: no perl"; exit 1; fi
40 if test ! -f perl.pixie; then echo "$0: no perl.pixie; exit 1; fi
41 if test ! -f t/perl; then echo "$0: no t/perl; exit 1; fi
44 export LD_LIBRARY_PATH
48 ln -sf ../perl.pixie .
51 the_t=`echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t uni/*.t pod/*.t x2p/*.t; find ../ext ../lib -name '*.t' -print`
57 export PERL_DESTRUCT_LEVEL
66 ext/*|lib/*) t=../$t ;;
67 t/*) t=`echo $t|sed 's:^t/::'` ;;
69 echo $t|sed 's:\.t$::'
71 case "`head -1 $t|egrep -e '^#.* -.*T'`" in
74 case "`head -1 $t|egrep -e '^#.* -.*t'`" in
77 ./perl.pixie -I../lib $sw $t > /dev/null
82 prof -pixie -merge new.Counts -L. -incobj libperl.so perl t/perl.Counts all.Counts
83 mv new.Counts all.Counts
85 mv t/perl.Counts all.Counts