develooper Front page | perl.perl5.porters | Postings from September 2010

[perl #77824] Bleadperl ac56e7d breaks Devel-NYTProf-4.04

Thread Next
Tim Bunce
September 13, 2010 07:21
[perl #77824] Bleadperl ac56e7d breaks Devel-NYTProf-4.04
Message ID:
# New Ticket Created by  Tim Bunce 
# Please include the string:  [perl #77824]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.39 running under perl 5.13.4.

[Please describe your issue here]

See RT#77552 (
for some relevant background details.

The NYTProf test failures seem to indicate that ac56e7d has wider effects than
its description implies.

t/10-run.t pipes the following to perl


and does some analysis of the profile. One test checks that the number
of statements executed is 2. That test is failing because number of statements
executed appears to be 1.

(t/70-subname.t pases but generates Attempt to free unreferenced scalar:
SV 0x822dd0 warnings. That's probably unrelated.)

A bunch of other tests fail in a way that suggests the statement on the
first line (and perhaps sometimes the last) isn't getting profiled.

The tests that fail only do so for the use_db_sub=0 case (the default).
That's the mode that uses opcode-redirection (instead of the DB::sub sub)
to do profiling. The OP_NEXTSTATE op is redirected to the pp_stmt_profiler()
sub which does the counting and profiling and calls the original op.

This behaviour isn't implied by the description of ac56e7d:

perl 5.12.0:
$ perl -MO=Terse -e '1+1;' -e '2+2;'
LISTOP (0x534f20) leave [1] 
OP (0x5099d0) enter 
COP (0x508b30) nextstate 
OP (0x509710) null [5] 
COP (0x515f10) nextstate 
OP (0x55e5a0) null [5] 

$ perl -MO=Terse -e '1+1;' -e '2+2;'
LISTOP (0x206d50) leave [1] 
OP (0x201b30) enter 
COP (0x2015e0) nextstate 
OP (0x206de0) null [5] 
OP (0x206a70) null 
OP (0x206a20) null [5] 

[Please do not change anything below this line]
Site configuration information for perl 5.13.4:

Configured by timbo at Mon Sep 13 10:23:30 IST 2010.

Summary of my perl5 (revision 5 version 13 subversion 4) configuration:
  Commit id: 526fd1b4d7270fff44588238f2411032c109da6e
    osname=darwin, osvers=10.4.0, archname=darwin-thread-multi-2level
    uname='darwin timac.local 10.4.0 darwin kernel version 10.4.0: fri apr 23 18:28:53 pdt 2010; root:xnu-1504.7.4~1release_i386 i386 '
    config_args='-des -Doptimize=-g -DEBUGGING=both -Dusethreads -Dusemultiplicity -Dusesitecustomize -Dusedevel -Uversiononly -Accflags=-DDEBUG_LEAKING_SCALARS -Dprefix=/usr/local/perl5-blead-deb-thr'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -DDEBUG_LEAKING_SCALARS -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
    cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -DDEBUG_LEAKING_SCALARS -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.2.1 (Apple Inc. build 5664)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /opt/local/lib /usr/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-ldl -lm -lutil -lc
    libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'

Locally applied patches:

@INC for perl 5.13.4:

Environment for perl 5.13.4:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About