From: Jarkko Hietaniemi Date: Sun, 18 Mar 2001 22:30:04 +0000 (+0000) Subject: Document the use of Third Degree (sparsely). X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=09187cb170014b7d158b84fa92795ed1ad2ae0d7;p=p5sagit%2Fp5-mst-13.2.git Document the use of Third Degree (sparsely). p4raw-id: //depot/perl@9216 --- diff --git a/pod/perlhack.pod b/pod/perlhack.pod index 1959680..1f398a4 100644 --- a/pod/perlhack.pod +++ b/pod/perlhack.pod @@ -1674,6 +1674,24 @@ standard Perl testset you would create and run Purify as: which would instrument Perl in memory, run Perl on test.pl, then finally report any memory problems. +=head2 Compaq's/Digital's Third Degree + +Third Degree is a tool for memory leak detection and memory access checks. +It is one of the many tools in the ATOM toolkit. The toolkit is only +available on Tru64 (formerly known as Digital UNIX formerly known as +DEC OSF/1). + +When building Perl, you must first run Configure with -Doptimize=-g +and -Uusemymalloc flags, after that you can use the make targets + +"perl.third" and "test.third". The short story is that with "atom" +you can instrument the Perl executable to create a new executable +called "perl.third." When the instrumented executable is run, it +creates a log of dubious memory traffic in file called "perl.3log". +See man atom and man third for more information. The most extensive +Third Degree documentation is available in the Compaq "Tru64 UNIX +Programmer's Guide", chapter "Debugging Programs with Third Degree". + =head2 CONCLUSION We've had a brief look around the Perl source, an overview of the stages diff --git a/t/TEST b/t/TEST index a3df291..122bd96 100755 --- a/t/TEST +++ b/t/TEST @@ -20,6 +20,21 @@ chdir 't' if -f 't/TEST'; die "You need to run \"make test\" first to set things up.\n" unless -e 'perl' or -e 'perl.exe'; +if ($ENV{PERL_3LOG}) { + unless (-x 'perl.third') { + unless (-x '../perl.third') { + die "You need to run \"make perl.third first.\n"; + } + else { + print "Symlinking ../perl.third as perl.third...\n"; + die "Failed to symlink: $!\n" + unless symlink("../perl.third", "perl.third"); + die "Symlinked but no executable perl.third: $!\n" + unless -x 'perl.third'; + } + } +} + # check leakage for embedders $ENV{PERL_DESTRUCT_LEVEL} = 2 unless exists $ENV{PERL_DESTRUCT_LEVEL};