Add a script for doing cumulative profile of the test suite.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 10 Apr 2001 13:45:01 +0000 (13:45 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 10 Apr 2001 13:45:01 +0000 (13:45 +0000)
(Requires ATOM, that is, Tru64.)

p4raw-id: //depot/perl@9672

MANIFEST
Porting/testall.atom [new file with mode: 0644]

index 09cd63b..d9d5176 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -32,6 +32,7 @@ Porting/patching.pod  How to report changes made to Perl
 Porting/patchls                Flexible patch file listing utility
 Porting/pumpkin.pod    Guidelines and hints for Perl maintainers
 Porting/repository.pod How to use the Perl repository
+Porting/testall.atom   Cumulative profile of the test suite with Third Degree
 README                 The Instructions
 README.Y2K             Notes about Year 2000 concerns
 README.aix             Notes about AIX port
diff --git a/Porting/testall.atom b/Porting/testall.atom
new file mode 100644 (file)
index 0000000..ca538ea
--- /dev/null
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+#
+# testall.atom
+# 
+# This script creates all.Counts file that can be fed to prof(1)
+# to produce various basic block counting profiles.
+#
+# This script needs to be run at the top level of the Perl build
+# directory after the "make all" and "make test" targets have been run.
+#
+# You will also need to have perl.pixie built,
+# which means that you will also have Configured with -Doptimize=-g.
+#
+# After the script has been run (this will take several minutes)
+# you will have a file called all.Counts, which contains the cumulative
+# basic block counting results over the whole Perl test suite.
+# You can produce various reports using prof(1);
+#
+#   prof -pixie               -all -L. perl all.Counts
+#   prof -pixie -heavy        -all -L. perl all.Counts
+#   prof -pixie -invocations  -all -L. perl all.Counts
+#   prof -pixie -lines        -all -L. perl all.Counts
+#   prof -pixie -testcoverage -all -L. perl all.Counts
+#   prof -pixie -zero         -all -L. perl all.Counts
+#
+# io/openpid and op/fork core on me, I don't know why and haven't
+# taken a look yet.
+#
+# jhi@iki.fi
+#
+
+if test ! -f /usr/bin/atom
+then
+    echo "$0: no /usr/bin/atom"
+    exit 1
+fi
+
+if test ! -f perl;       then echo "$0: no perl";      exit 1; fi
+if test ! -f perl.pixie; then echo "$0: no perl.pixie; exit 1; fi
+if test ! -f t/perl;     then echo "$0: no t/perl;     exit 1; fi
+
+LD_LIBRARY_PATH=`pwd`
+export LD_LIBRARY_PATH
+
+cd t || exit 1
+
+ln -sf ../perl.pixie .
+
+the_t=`echo base/*.t comp/*.t cmd/*.t run/*.t io/*.t; echo op/*.t pragma/*.t lib/*.t pod/*.t camel-III/*.t`
+
+PERL_DESTRUCT_LEVEL=2
+export PERL_DESTRUCT_LEVEL
+
+rm -f all.Counts
+
+for t in $the_t
+do
+    echo `echo $t|sed s:\.t$::`" \c"
+    case "$t" in
+    *taint*|pragma/locale.t|lib/basename.t)
+       T=-T ;;
+    *)
+       T='' ;;
+    esac
+    ./perl.pixie $T $t > /dev/null
+    if cd ..
+    then
+        if test -f all.Counts
+        then
+            prof -pixie -merge new.Counts -L. -incobj libperl.so perl t/perl.Counts all.Counts
+            mv new.Counts all.Counts
+        else
+            mv t/perl.Counts all.Counts
+        fi 
+        cd t
+    fi
+done
+
+exit 0