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

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

Thread Next
From:
Tim Bunce
Date:
September 13, 2010 07:21
Subject:
[perl #77824] Bleadperl ac56e7d breaks Devel-NYTProf-4.04
Message ID:
rt-3.6.HEAD-5116-1284374385-627.77824-75-0@perl.org
# New Ticket Created by  Tim Bunce 
# Please include the string:  [perl #77824]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=77824 >



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


-----------------------------------------------------------------
[Please describe your issue here]

See RT#77552 (http://rt.perl.org/rt3/Ticket/Display.html?id=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

1+1;
2+2;

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-blead:
$ 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]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
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
  Platform:
    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
  Compiler:
    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',
    optimize='-g',
    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
    gnulibc_version=''
  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:
    /usr/local/perl5-blead-deb-thr/lib/site_perl/5.13.4/darwin-thread-multi-2level
    /usr/local/perl5-blead-deb-thr/lib/site_perl/5.13.4
    /usr/local/perl5-blead-deb-thr/lib/5.13.4/darwin-thread-multi-2level
    /usr/local/perl5-blead-deb-thr/lib/5.13.4
    /usr/local/perl5-blead-deb-thr/lib/site_perl/5.11.4
    /usr/local/perl5-blead-deb-thr/lib/site_perl/5.11.3
    /usr/local/perl5-blead-deb-thr/lib/site_perl/5.11.2
    /usr/local/perl5-blead-deb-thr/lib/site_perl
    .

---
Environment for perl 5.13.4:
    DYLD_LIBRARY_PATH=:/usr/local/pgsql/lib/:/opt/local/lib/mysql5/mysql
    HOME=/Users/timbo
    LANG=en_IE.UTF-8
    LANGUAGE (unset)
    LC_ALL=en_IE.UTF-8
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/local/perl5-blead-deb-thr/bin:/usr/local/pgsql/bin:/Users/timbo/bin:/usr/local/perl512-dev/bin:/Users/timbo/perl6/rakudo/parrot_install/bin:/usr/local/mysql/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
    PERLCRITIC=/Users/timbo/.setdev/perlcriticrc
    PERLTIDY=/Users/timbo/.setdev/perltidyrc
    PERL_BADLANG (unset)
    SHELL=/bin/bash


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