diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-20 07:36:36 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-20 07:36:36 +0000 |
commit | 95667ae449650939b6e6a521264f3846244da96a (patch) | |
tree | b4171f1c7b56c1ca0954ae204e5e0422c75d1483 | |
parent | d7b9cf6367cabfbce13a74b4cf20865766a2274a (diff) | |
download | perl-95667ae449650939b6e6a521264f3846244da96a.tar.gz |
move DProf things around to where they are supposed to be
p4raw-id: //depot/perl@3710
-rw-r--r-- | INSTALL | 1 | ||||
-rw-r--r-- | MANIFEST | 29 | ||||
-rw-r--r-- | ext/Devel/DProf/Makefile.PL | 27 | ||||
-rw-r--r-- | ext/Devel/DProf/t/test1.pl | 32 | ||||
-rwxr-xr-x | installman | 1 | ||||
-rwxr-xr-x | installperl | 2 | ||||
-rw-r--r-- | pod/roffitall | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | t/lib/dprof.t (renamed from ext/Devel/DProf/test.pl) | 27 | ||||
-rw-r--r-- | t/lib/dprof/V.pm (renamed from ext/Devel/DProf/t/V.pm) | 22 | ||||
-rw-r--r-- | t/lib/dprof/test1_t (renamed from ext/Devel/DProf/t/test1.t) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test1_v (renamed from ext/Devel/DProf/t/test1.v) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test2_t (renamed from ext/Devel/DProf/t/test2.t) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test2_v (renamed from ext/Devel/DProf/t/test2.v) | 8 | ||||
-rw-r--r-- | t/lib/dprof/test3_t (renamed from ext/Devel/DProf/t/test3.t) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test3_v (renamed from ext/Devel/DProf/t/test3.v) | 8 | ||||
-rw-r--r-- | t/lib/dprof/test4_t (renamed from ext/Devel/DProf/t/test4.t) | 2 | ||||
-rw-r--r-- | t/lib/dprof/test4_v (renamed from ext/Devel/DProf/t/test4.v) | 8 | ||||
-rw-r--r-- | t/lib/dprof/test5_t (renamed from ext/Devel/DProf/t/test5.t) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test5_v (renamed from ext/Devel/DProf/t/test5.v) | 2 | ||||
-rw-r--r-- | t/lib/dprof/test6_t (renamed from ext/Devel/DProf/t/test6.t) | 0 | ||||
-rw-r--r-- | t/lib/dprof/test6_v (renamed from ext/Devel/DProf/t/test6.v) | 2 | ||||
-rw-r--r-- | utils/Makefile | 8 | ||||
-rw-r--r-- | utils/dprofpp.PL (renamed from ext/Devel/DProf/dprofpp.PL) | 0 | ||||
-rw-r--r-- | vms/descrip_mms.template | 5 | ||||
-rw-r--r-- | win32/Makefile | 3 | ||||
-rw-r--r-- | win32/makefile.mk | 3 |
26 files changed, 66 insertions, 125 deletions
@@ -1449,6 +1449,7 @@ make install will install the following: pod2man, and pod2text splain Describe Perl warnings and errors + dprofpp Perl code profile post-processor library files in $privlib and $archlib specified to Configure, usually under /usr/local/lib/perl5/. @@ -222,21 +222,6 @@ ext/Devel/DProf/DProf.pm Perl code profiler ext/Devel/DProf/DProf.xs Perl code profiler ext/Devel/DProf/Makefile.PL Perl code profiler makefile writer ext/Devel/DProf/Todo Perl code profiler todo list -ext/Devel/DProf/dprofpp.PL Perl code profile post-processor -ext/Devel/DProf/t/test1.pl Perl code profiler tests -ext/Devel/DProf/t/test1.t Perl code profiler tests -ext/Devel/DProf/t/test1.v Perl code profiler tests -ext/Devel/DProf/t/test2.t Perl code profiler tests -ext/Devel/DProf/t/test2.v Perl code profiler tests -ext/Devel/DProf/t/test3.t Perl code profiler tests -ext/Devel/DProf/t/test3.v Perl code profiler tests -ext/Devel/DProf/t/test4.t Perl code profiler tests -ext/Devel/DProf/t/test4.v Perl code profiler tests -ext/Devel/DProf/t/test5.t Perl code profiler tests -ext/Devel/DProf/t/test5.v Perl code profiler tests -ext/Devel/DProf/t/test6.t Perl code profiler tests -ext/Devel/DProf/t/test6.v Perl code profiler tests -ext/Devel/DProf/test.pl Perl code profiler testsuite driver ext/Devel/Peek/Changes Data debugging tool, changelog ext/Devel/Peek/Makefile.PL Data debugging tool, makefile writer ext/Devel/Peek/Peek.pm Data debugging tool, module and pod @@ -1134,6 +1119,19 @@ t/lib/db-hash.t See if DB_File works t/lib/db-recno.t See if DB_File works t/lib/dirhand.t See if DirHandle works t/lib/dosglob.t See if File::DosGlob works +t/lib/dprof.t Perl code profiler testsuite driver +t/lib/dprof/test1_t Perl code profiler tests +t/lib/dprof/test1_v Perl code profiler tests +t/lib/dprof/test2_t Perl code profiler tests +t/lib/dprof/test2_v Perl code profiler tests +t/lib/dprof/test3_t Perl code profiler tests +t/lib/dprof/test3_v Perl code profiler tests +t/lib/dprof/test4_t Perl code profiler tests +t/lib/dprof/test4_v Perl code profiler tests +t/lib/dprof/test5_t Perl code profiler tests +t/lib/dprof/test5_v Perl code profiler tests +t/lib/dprof/test6_t Perl code profiler tests +t/lib/dprof/test6_v Perl code profiler tests t/lib/dumper-ovl.t See if Data::Dumper works for overloaded data t/lib/dumper.t See if Data::Dumper works t/lib/english.t See if English works @@ -1366,6 +1364,7 @@ util.c Utility routines util.h Dummy header utils/Makefile Extract the utility scripts utils/c2ph.PL program to translate dbx stabs to perl +utils/dprofpp.PL Perl code profile post-processor utils/h2ph.PL A thing to turn C .h files into perl .ph files utils/h2xs.PL Program to make .xs files from C header files utils/perlbug.PL A simple tool to submit a bug report diff --git a/ext/Devel/DProf/Makefile.PL b/ext/Devel/DProf/Makefile.PL index 6de38f7ad0..667cc52913 100644 --- a/ext/Devel/DProf/Makefile.PL +++ b/ext/Devel/DProf/Makefile.PL @@ -4,9 +4,7 @@ WriteMakefile( NAME => 'Devel::DProf', DISTNAME => 'DProf', VERSION_FROM => 'DProf.pm', - clean => { 'FILES' => 'tmon.out t/tmon.out t/err dprofpp T/tmon.out'}, - EXE_FILES => ['dprofpp'], - PL_FILES => {'dprofpp.PL' => 'dprofpp'}, + clean => { 'FILES' => 'tmon.out t/tmon.out t/err'}, XSPROTOARG => '-noprototypes', DEFINE => '-DPERLDBf_NONAME=0x40 -DPERLDBf_GOTO=0x80 ' .'-DG_NODEBUG=32 -DPL_NEEDED', @@ -17,26 +15,3 @@ WriteMakefile( }, MAN3PODS => {}, ); - -sub MY::test_via_harness { "" } -#sub MY::test_via_harness { -# my( $self, $perl, $tests ) = @_; -# my $t = quotemeta( $tests ); -# my $res; -# -# $res = $self->MM::test_via_harness( $perl, $tests ); -# $res =~ s/^(\s+)/$1-/; -# $res =~ s/(&runtests)/\$\$switches $1/; -# $res =~ s/(; runtests)/; \$\$switches=q{-d:DProf}$1/; -# $res =~ s,$t,t/bug.t,; -# $res; -#} - -sub MY::test_via_script { - my( $self, $perl, $script ) = @_; - my $res; - - $res = $self->MM::test_via_script( $perl, $script ); - $res =~ s/(test.pl)/$1 -p $perl/; - $res; -} diff --git a/ext/Devel/DProf/t/test1.pl b/ext/Devel/DProf/t/test1.pl deleted file mode 100644 index af792ed85c..0000000000 --- a/ext/Devel/DProf/t/test1.pl +++ /dev/null @@ -1,32 +0,0 @@ -END { print "main:: the end\n" } -sub FOO::END { print "foo:: the end\n" } - - -sub foo { - my $x; - my $y; - print "in sub foo\n"; - for( $x = 1; $x < 100; ++$x ){ - bar(); - for( $y = 1; $y < 100; ++$y ){ - } - } -} - -sub bar { - my $x; - print "in sub bar\n"; - for( $x = 1; $x < 100; ++$x ){ - } -} - -sub baz { - print "in sub baz\n"; - bar(); - foo(); -} - -bar(); -baz(); -foo(); - diff --git a/installman b/installman index ccb007c980..04ef5783f8 100755 --- a/installman +++ b/installman @@ -70,6 +70,7 @@ runpod2man('utils', $man1dir, $man1ext, 'perldoc'); runpod2man('utils', $man1dir, $man1ext, 'perlbug'); runpod2man('utils', $man1dir, $man1ext, 'pl2pm'); runpod2man('utils', $man1dir, $man1ext, 'splain'); +runpod2man('utils', $man1dir, $man1ext, 'dprofpp'); runpod2man('x2p', $man1dir, $man1ext, 's2p'); runpod2man('x2p', $man1dir, $man1ext, 'a2p.pod'); runpod2man('pod', $man1dir, $man1ext, 'pod2man'); diff --git a/installperl b/installperl index 3aa5285268..39dafa8ba7 100755 --- a/installperl +++ b/installperl @@ -57,7 +57,7 @@ while (@ARGV) { umask 022 unless $Is_VMS; my @scripts = qw(utils/c2ph utils/h2ph utils/h2xs utils/perlbug utils/perldoc - utils/pl2pm utils/splain utils/perlcc + utils/pl2pm utils/splain utils/perlcc utils/dprofpp x2p/s2p x2p/find2perl pod/pod2man pod/pod2html pod/pod2latex pod/pod2text pod/pod2usage pod/podchecker pod/podselect); diff --git a/pod/roffitall b/pod/roffitall index 1bafa8d111..afb4432e2a 100644 --- a/pod/roffitall +++ b/pod/roffitall @@ -86,6 +86,7 @@ toroff=` \ $mandir/a2p.1 \ $mandir/c2ph.1 \ + $mandir/dprofpp.1 \ $mandir/h2ph.1 \ $mandir/h2xs.1 \ $mandir/perlbug.1 \ diff --git a/ext/Devel/DProf/test.pl b/t/lib/dprof.t index a889feccd8..97e42bfcb2 100644..100755 --- a/ext/Devel/DProf/test.pl +++ b/t/lib/dprof.t @@ -1,6 +1,9 @@ -# perl +#!perl -require 5.003; +BEGIN { + chdir( 't' ) if -d 't'; + unshift @INC, '../lib'; +} use Benchmark qw( timediff timestr ); use Getopt::Std 'getopts'; @@ -11,19 +14,9 @@ getopts('vI:p:'); # -I Add to @INC # -p Name of perl binary -unless (-r 'dprofpp' and -M 'dprofpp' <= -M 'dprofpp.PL') { - print STDERR "dprofpp out of date, extracting...\n"; - system 'perl', 'dprofpp.PL' and die 'perl dprofpp.PL: exit code $?, $!'; -} -die "Need dprofpp, could not make it" unless -r 'dprofpp'; - -chdir( 't' ) if -d 't'; -@tests = @ARGV ? @ARGV : sort <*.t *.v>; # glob-sort, for OS/2 +@tests = @ARGV ? @ARGV : sort <lib/dprof/*_t lib/dprof/*_v>; # glob-sort, for OS/2 $path_sep = $Config{path_sep} || ':'; -if( -d '../blib' ){ - unshift @INC, '../blib/arch', '../blib/lib'; -} $perl5lib = $opt_I || join( $path_sep, @INC ); $perl = $opt_p || $^X; @@ -62,15 +55,17 @@ sub profile { sub verify { my $test = shift; - system $perl, '-I.', $test, $opt_v?'-v':'', '-p', $perl; + system $perl, '-I../lib', '-I./lib/dprof', $test, + $opt_v?'-v':'', '-p', $perl; } $| = 1; +print "1..18\n"; while( @tests ){ $test = shift @tests; - print $test . '.' x (20 - length $test); - if( $test =~ /t$/ ){ + if( $test =~ /_t$/i ){ + print "# $test" . '.' x (20 - length $test); profile $test; } else{ diff --git a/ext/Devel/DProf/t/V.pm b/t/lib/dprof/V.pm index e8d59a8129..7e34da5d47 100644 --- a/ext/Devel/DProf/t/V.pm +++ b/t/lib/dprof/V.pm @@ -1,7 +1,7 @@ package V; use Getopt::Std 'getopts'; -getopts('vp:'); +getopts('vp:d:'); require Exporter; @ISA = 'Exporter'; @@ -9,18 +9,19 @@ require Exporter; @EXPORT = qw( dprofpp $opt_v $results $expected report @results ); @EXPORT_OK = qw( notok ok $num ); -my $out = 0; $num = 0; $results = $expected = ''; $perl = $opt_p || $^X; +$dpp = $opt_d || '../utils/dprofpp'; print "\nperl: $perl\n" if $opt_v; if( ! -f $perl ){ die "Where's Perl?" } +if( ! -f $dpp ){ die "Where's dprofpp?" } sub dprofpp { my $switches = shift; - open( D, "$perl ../dprofpp $switches 2> err |" ) || warn "$0: Can't run. $!\n"; + open( D, "$perl -I../lib $dpp $switches 2> err |" ) || warn "$0: Can't run. $!\n"; @results = <D>; close D; @@ -46,20 +47,13 @@ sub report { } sub ok { - ++$out; - print "ok $num, "; + print "ok $num\n"; } sub notok { - ++$out; - print "not ok $num, "; - if( $opt_v ){ - print "\nResult\n{$results}\n"; - print "Expected\n{$expected}\n"; - } + print "not ok $num\n"; + print "\nResult\n{$results}\n"; + print "Expected\n{$expected}\n"; } -END { print "\n" if $out } - - 1; diff --git a/ext/Devel/DProf/t/test1.t b/t/lib/dprof/test1_t index d504cd5536..d504cd5536 100644 --- a/ext/Devel/DProf/t/test1.t +++ b/t/lib/dprof/test1_t diff --git a/ext/Devel/DProf/t/test1.v b/t/lib/dprof/test1_v index 542a503414..542a503414 100644 --- a/ext/Devel/DProf/t/test1.v +++ b/t/lib/dprof/test1_v diff --git a/ext/Devel/DProf/t/test2.t b/t/lib/dprof/test2_t index edc46c527e..edc46c527e 100644 --- a/ext/Devel/DProf/t/test2.t +++ b/t/lib/dprof/test2_t diff --git a/ext/Devel/DProf/t/test2.v b/t/lib/dprof/test2_v index 3e9b18373b..8b775b3131 100644 --- a/ext/Devel/DProf/t/test2.v +++ b/t/lib/dprof/test2_v @@ -15,10 +15,10 @@ main::baz main::foo main::bar }; -report 1, sub { $expected eq $results }; +report 5, sub { $expected eq $results }; dprofpp('-TF'); -report 2, sub { $expected eq $results }; +report 6, sub { $expected eq $results }; dprofpp( '-t' ); $expected = @@ -30,7 +30,7 @@ main::baz main::foo main::bar }; -report 3, sub { $expected eq $results }; +report 7, sub { $expected eq $results }; dprofpp('-tF'); -report 4, sub { $expected eq $results }; +report 8, sub { $expected eq $results }; diff --git a/ext/Devel/DProf/t/test3.t b/t/lib/dprof/test3_t index a5327f4d7a..a5327f4d7a 100644 --- a/ext/Devel/DProf/t/test3.t +++ b/t/lib/dprof/test3_t diff --git a/ext/Devel/DProf/t/test3.v b/t/lib/dprof/test3_v index 31211c10d5..df7543e2b8 100644 --- a/ext/Devel/DProf/t/test3.v +++ b/t/lib/dprof/test3_v @@ -9,7 +9,7 @@ main::baz main::bar main::foo }; -report 1, sub { $expected eq $results }; +report 9, sub { $expected eq $results }; dprofpp('-TF'); $e2 = $expected = @@ -18,12 +18,12 @@ main::baz main::bar main::foo }; -report 2, sub { $expected eq $results }; +report 10, sub { $expected eq $results }; dprofpp( '-t' ); $expected = $e1; -report 3, sub { 1 }; +report 11, sub { 1 }; dprofpp('-tF'); $expected = $e2; -report 4, sub { $expected eq $results }; +report 12, sub { $expected eq $results }; diff --git a/ext/Devel/DProf/t/test4.t b/t/lib/dprof/test4_t index 7d5a356272..729968270a 100644 --- a/ext/Devel/DProf/t/test4.t +++ b/t/lib/dprof/test4_t @@ -17,7 +17,7 @@ sub baz { bar(); -fork; +eval { fork }; bar(); baz(); diff --git a/ext/Devel/DProf/t/test4.v b/t/lib/dprof/test4_v index 3e9b18373b..d9677ff785 100644 --- a/ext/Devel/DProf/t/test4.v +++ b/t/lib/dprof/test4_v @@ -15,10 +15,10 @@ main::baz main::foo main::bar }; -report 1, sub { $expected eq $results }; +report 13, sub { $expected eq $results }; dprofpp('-TF'); -report 2, sub { $expected eq $results }; +report 14, sub { $expected eq $results }; dprofpp( '-t' ); $expected = @@ -30,7 +30,7 @@ main::baz main::foo main::bar }; -report 3, sub { $expected eq $results }; +report 15, sub { $expected eq $results }; dprofpp('-tF'); -report 4, sub { $expected eq $results }; +report 16, sub { $expected eq $results }; diff --git a/ext/Devel/DProf/t/test5.t b/t/lib/dprof/test5_t index 0b1113757f..0b1113757f 100644 --- a/ext/Devel/DProf/t/test5.t +++ b/t/lib/dprof/test5_t diff --git a/ext/Devel/DProf/t/test5.v b/t/lib/dprof/test5_v index 8f9025281f..9e9298c689 100644 --- a/ext/Devel/DProf/t/test5.v +++ b/t/lib/dprof/test5_v @@ -11,5 +11,5 @@ main::foo2 main::bar main::yeppers }; -report 1, sub { $expected eq $results }; +report 17, sub { $expected eq $results }; diff --git a/ext/Devel/DProf/t/test6.t b/t/lib/dprof/test6_t index 7b8bf4a722..7b8bf4a722 100644 --- a/ext/Devel/DProf/t/test6.t +++ b/t/lib/dprof/test6_t diff --git a/ext/Devel/DProf/t/test6.v b/t/lib/dprof/test6_v index 1236285f59..2f651ea794 100644 --- a/ext/Devel/DProf/t/test6.v +++ b/t/lib/dprof/test6_v @@ -12,5 +12,5 @@ main::baz main::foo main::bar }; -report 1, sub { $expected eq $results }; +report 18, sub { $expected eq $results }; diff --git a/utils/Makefile b/utils/Makefile index 8051d2893f..f3a0663bc1 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -5,9 +5,9 @@ REALPERL = ../perl # Files to be built with variable substitution after miniperl is # available. Dependencies handled manually below (for now). -pl = c2ph.PL h2ph.PL h2xs.PL perlbug.PL perldoc.PL pl2pm.PL splain.PL perlcc.PL -plextract = c2ph h2ph h2xs perlbug perldoc pl2pm splain perlcc -plextractexe = c2ph.exe h2ph.exe h2xs.exe perlbug.exe perldoc.exe pl2pm.exe splain.exe perlcc.exe +pl = c2ph.PL h2ph.PL h2xs.PL perlbug.PL perldoc.PL pl2pm.PL splain.PL perlcc.PL dprofpp.PL +plextract = c2ph h2ph h2xs perlbug perldoc pl2pm splain perlcc dprofpp +plextractexe = c2ph.exe h2ph.exe h2xs.exe perlbug.exe perldoc.exe pl2pm.exe splain.exe perlcc.exe dprofpp.exe all: $(plextract) @@ -33,6 +33,8 @@ splain: splain.PL ../config.sh ../lib/diagnostics.pm perlcc: perlcc.PL ../config.sh +dprofpp: dprofpp.PL ../config.sh + clean: realclean: diff --git a/ext/Devel/DProf/dprofpp.PL b/utils/dprofpp.PL index c5130629f4..c5130629f4 100644 --- a/ext/Devel/DProf/dprofpp.PL +++ b/utils/dprofpp.PL diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 0bd08de57b..84f8d04d64 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -341,7 +341,7 @@ CRTLOPTS =,$(CRTL)/Options # Modules which must be installed before we can build extensions LIBPREREQ = $(ARCHDIR)Config.pm [.lib]DynaLoader.pm [.lib]vmsish.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]XSSymSet.pm -utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com [.lib]perlcc.com +utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com [.lib]perlcc.com [.utils]dprofpp.com utils2 = [.lib]splain.com [.utils]pl2pm.com .ifdef NOX2P @@ -496,6 +496,9 @@ dynext : $(LIBPREREQ) $(DBG)perlshr$(E) [.utils]c2ph.com : [.utils]c2ph.PL $(ARCHDIR)Config.pm $(MINIPERL) $(MMS$SOURCE) +[.utils]dprofpp.com : [.utils]dprofpp.PL $(ARCHDIR)Config.pm + $(MINIPERL) $(MMS$SOURCE) + [.utils]h2ph.com : [.utils]h2ph.PL $(ARCHDIR)Config.pm $(MINIPERL) $(MMS$SOURCE) diff --git a/win32/Makefile b/win32/Makefile index b852a1e461..9dd557673f 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -362,6 +362,7 @@ GLOBBAT = bin\perlglob.bat UTILS = \ ..\utils\h2ph \ ..\utils\splain \ + ..\utils\dprofpp \ ..\utils\perlbug \ ..\utils\pl2pm \ ..\utils\c2ph \ @@ -929,7 +930,7 @@ distclean: clean -del /f $(PODDIR)\*.html -del /f $(PODDIR)\*.bat cd ..\utils - -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct + -del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc pstruct dprofpp -del /f *.bat cd ..\win32 cd ..\x2p diff --git a/win32/makefile.mk b/win32/makefile.mk index 0b74406eb5..98c5c026de 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -453,6 +453,7 @@ GLOBBAT = bin\perlglob.bat UTILS = \ ..\utils\h2ph \ ..\utils\splain \ + ..\utils\dprofpp \ ..\utils\perlbug \ ..\utils\pl2pm \ ..\utils\c2ph \ @@ -1073,7 +1074,7 @@ distclean: clean -del /f $(PODDIR)\*.html -del /f $(PODDIR)\*.bat -cd ..\utils && del /f h2ph splain perlbug pl2pm c2ph h2xs perldoc \ - pstruct *.bat + dprofpp pstruct *.bat -cd ..\x2p && del /f find2perl s2p *.bat -del /f ..\config.sh ..\splittree.pl perlmain.c dlutils.c config.h.new -del /f $(CONFIGPM) |