develooper Front page | perl.perl5.porters | Postings from August 2009

perlhack.pod [PATCH]

Thread Next
From:
John P. Linderman
Date:
August 25, 2009 10:18
Subject:
perlhack.pod [PATCH]
Message ID:
20090825171814.94E472E61F@research.att.com
If you follow the quick hint for building perl.gprof in perlhack,
then try running a

make test

several tests fail because gmon.out files get created in some
test directories where the contents are presumed known, and don't
include gmon.out.  I pretty much guessed what was happening, but,
in an attempt to better understand what was going on, I ran with
the test harness as the make test output suggested, and that flat
out hung up.

One could try to fix the tests, but I think it makes better sense
to fix the quick hint in perlhack.pod, perhaps as the attached patch
indicates.  By replacing

sh Configure -des -Dusedevel -Doptimize='-g' -Accflags='-pg' -Aldflags='
-pg' && make

with

sh Configure -des -Dusedevel -Doptimize='-pg' && make perl.gprof

we leave most of the grotty details in the makefile, where they
belong, and build perl.gprof rather than perl.  If you then try a

make test

a new version of perl (not perl.gprof) gets built, and, whether by
accident or clever intent, it doesn't arm the gprof stuff,
and the tests all work just fine.

The patch also replaces

$ gprof perl > out

with

$ gprof ./perl.gprof > out

with the ./ prepended to better parallel the original invocation,
and to emphasize that gprof is looking for a file, not a command
in your search PATH.  -- jpl

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About