Tim Bunce wrote:
> So, can you give r796 a whirl and let us know how it goes?

Success!


But first, failure!  :]

r796-r805 all result in a compilation failure:

/some/path/perl-5.10.0/bin/perl /some/other/path/lib/perl5/ExtUtils/xsubpp  
-typemap /some/path/perl-5.10.0/lib/5.10.0/ExtUtils/typemap -typemap typemap  
NYTProf.xs > NYTProf.xsc && mv NYTProf.xsc NYTProf.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm -O2   -DVERSION=\"2.10\" -DXS_VERSION=\"2.10\" -fPIC 
"-I/some/path/perl-5.10.0/lib/5.10.0/x86_64-linux-thread-multi/CORE"  
-DHAS_CLOCK_GETTIME -DHAS_ZLIB -W -Wall -Wpointer-arith -Wbad-function-cast 
-Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn 
-Wno-unused-parameter NYTProf.c
NYTProf.xs:349: error: expected â or â before â token
NYTProf.xs: In function â:
NYTProf.xs:1744: warning: format â expects type â, but argument 2 has type â
NYTProf.xs:1760: warning: format â expects type â, but argument 4 has type â
NYTProf.xs: In function â:
NYTProf.xs:2263: warning: cast from pointer to integer of different size
NYTProf.xs:2331: warning: initialization discards qualifiers from pointer 
target type


(This specific output with r805.)  Commenting out NYTProf.xs:349

    /*    __attribute__format__(__printf__,1,2) */

allows it to compile.


Once I got past that, I got brilliant results.  :]  My big cost was Moose type 
constraint validation.  At first, I was stumped as to which specific attribute 
I should be looking at or whether it was Moose in general.  But then I noticed 
that the second sub in the exclusive time list was in 
Moose::Meta::TypeConstraint::Union.  Ah, validating a union constraint 
definitely sounds expensive.  I had to to ack the code to remember exactly 
where I had done it.  Once I had commented out an "isa => 
'HashRef[Str|ArrayRef[Str]]'", I got a 19% reduction in elapsed time.  Score!  
Unfortunately, further gains do not look to be as easy; the most expensive sub 
after that change doesn't have any real single hot spots.


In regards to the earlier question, as you can see below, an int is 32 bits; 
however, it is a fully 64 bit perl.


Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
 Platform:
   osname=linux, osvers=2.6.9-55.elsmp, archname=x86_64-linux-thread-multi
   uname='linux hostname 2.6.9-55.elsmp #1 smp fri apr 20 16:36:54edt 2007 
x86_64 x86_64 x86_64 gnulinux '
   config_args='-des -Dprefix=/some/path/perl-5.10.0 -Dusethreads'
   hint=recommended, useposix=true, d_sigaction=define
   useithreads=define, usemultiplicity=define
   useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
   use64bitint=define, use64bitall=define, uselongdouble=undef
   usemymalloc=n, bincompat5005=undef
 Compiler:
   cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe 
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm',
   optimize='-O2',
   cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe 
-I/usr/local/include -I/usr/include/gdbm'
   ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-8)', gccosandvers=''
   intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
   d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
   ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
   alignbytes=8, prototype=define
 Linker and Libraries:
   ld='cc', ldflags =' -L/usr/local/lib'
   libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
   libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
   libc=/lib/libc-2.3.4.so, so=so, useshrplib=false, libperl=libperl.a
   gnulibc_version='2.3.4'
 Dynamic Linking:
   dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
   cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib'


Characteristics of this binary (from libperl):  Compile-time options: 
MULTIPLICITY PERL_DONT_CREATE_GVSV
                       PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_64_BIT_ALL
                       USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                       USE_PERLIO USE_REENTRANT_API
 Built under linux
 Compiled at Dec  5 2008 14:26:49
 @INC:
   /some/path/perl-5.10.0/lib/5.10.0/x86_64-linux-thread-multi
   /some/path/perl-5.10.0/lib/5.10.0
   /some/path/perl-5.10.0/lib/site_perl/5.10.0/x86_64-linux-thread-multi
   /some/path/perl-5.10.0/lib/site_perl/5.10.0
   .

--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.

Group hosted at:  http://groups.google.com/group/develnytprof-dev
Project hosted at:  http://perl-devel-nytprof.googlecode.com
CPAN distribution:  http://search.cpan.org/dist/Devel-NYTProf

To post, email:  [email protected]
To unsubscribe, email:  [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to