Subject: | Error profiling code which uses Math::Pari |
Read Tim's blog post and wanted to try this awesome new profiler. I ran it against my test
suite like:
$ PERL5OPT=-d:NYTProf prove test/t/
As it ran through my test suite I got the following two errors (and only these 2):
unknown entersub xs '_gmul' at /usr/local/lib/perl5/site_perl/5.8.8/mach/Math/Pari.pm line
994.
SV = PVMG(0x8060cf4) at 0x80b2964
REFCNT = 3
FLAGS = (GMG,SMG,READONLY,pPOK)
IV = 0
NV = 0
PV = 0xad62020 "_gmul"\0
CUR = 5
LEN = 128
MAGIC = 0x80b6b98
MG_VIRTUAL = &PL_vtbl_sv
MG_TYPE = PERL_MAGIC_sv(\0)
MG_OBJ = 0x80b2940
MG_LEN = 1
MG_PTR = 0x8050b84 "1"
unknown entersub xs '_gadd' at /usr/local/lib/perl5/site_perl/5.8.8/mach/Math/Pari.pm line
994.
SV = PVMG(0x8060cf4) at 0x80b2964
REFCNT = 6
FLAGS = (GMG,SMG,READONLY,pPOK)
IV = 0
NV = 0
PV = 0xad62020 "_gadd"\0
CUR = 5
LEN = 128
MAGIC = 0x80b6b98
MG_VIRTUAL = &PL_vtbl_sv
MG_TYPE = PERL_MAGIC_sv(\0)
MG_OBJ = 0x80b2940
MG_LEN = 1
MG_PTR = 0x8050b84 "1"
I hoped I'd be ok, and ran the report program but got an error:
$ nytprofhtml
Generating report...
File format error: token 4 (''), line 476422 at
/usr/local/lib/perl5/site_perl/5.8.8/mach/Devel/NYTProf/Data.pm line 72.
I then tried running it against a single test file (which shouldn't be using Math::Pari), and
while I got no errors running the test I got a different error running the report generator:
$ nytprofhtml
Generating report...
Fid 11053 used but not defined at
/usr/local/lib/perl5/site_perl/5.8.8/mach/Devel/NYTProf/Data.pm line 72.
File format error: token 131 ('?'), line 7358 at
/usr/local/lib/perl5/site_perl/5.8.8/mach/Devel/NYTProf/Data.pm line 72.
Finally, perl & platform information
$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=freebsd, osvers=6.2-release, archname=i386-freebsd-64int
uname='freebsd freebsd.org 6.2-release freebsd 6.2-release #0: sat oct 14 21:57:31 pdt
2006 kris@freebsd.org:usrsrcsysmagickernelpath i386 '
config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.8/mach -
Dprivlib=/usr/local/lib/perl5/5.8.8 -Dman3dir=/usr/local/lib/perl5/5.8.8/perl/man/man3
-Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.8/mach -
Dsitelib=/usr/local/lib/perl5/site_perl/5.8.8 -Dscriptdir=/usr/local/bin -
Dsiteman3dir=/usr/local/lib/perl5/5.8.8/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dccflags=-
DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -Doptimize=-O2 -fno-strict-aliasing -
pipe -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y -Duse64bitint'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -
I/usr/local/include',
optimize='-O2 -fno-strict-aliasing -pipe ',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK -
DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -
I/usr/local/include'
ccversion='', gccversion='3.4.6 [FreeBSD] 20060305', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-
R/usr/local/lib/perl5/5.8.8/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO
Locally applied patches:
defined-or
Built under freebsd
Compiled at Oct 15 2006 05:04:59
%ENV:
PERL5LIB="/usr/local/app/directski/lib/perl"
@INC:
/usr/local/app/directski/lib/perl
/usr/local/lib/perl5/5.8.8/BSDPAN
/usr/local/lib/perl5/site_perl/5.8.8/mach
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.8/mach
/usr/local/lib/perl5/5.8.8
Drew