You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John Siracusa <si...@mindspring.com> on 2003/07/26 00:56:36 UTC

DProf on Mac OS X

Has anyone gotten this to work on OS X?

 From http://perl.apache.org/docs/1.0/guide/performance.html

   % setenv PERL5OPT -d:DProf
   % httpd -X -d `pwd` &
   ... make some requests to the server here ...
   % kill `cat logs/httpd.pid`
   % unsetenv PERL5OPT
   % dprofpp

I've used this profiling technique on other Unix-like OSes, so I think 
I'm doing it right.  But on OS X, I get a tiny tmon.out file that never 
grows after the initial server startup.  I don't see any error messages 
or log lines.

When I try to use Apache::DProf, I get a bus error on any request:

[Fri Jul 25 18:52:48 2003] [notice] child pid 3840 exit signal Bus 
error (10)

My setup:

apache 1.3.27, mod_perl 1.27

% uname -a
Darwin derkins 6.6 Darwin Kernel Version 6.6: Thu May  1 21:48:54 PDT 
2003; root:xnu/xnu-344.34.obj~1/RELEASE_PPC  Power Macintosh powerpc

% perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
   Platform:
     osname=darwin, osvers=6.0, archname=darwin
     uname='darwin derkins 6.0 darwin kernel version 6.0: sat jul 27 
13:18:52 pdt 2002; root:xnuxnu-344.obj~1release_ppc power macintosh 
powerpc '
     config_args=''
     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=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-pipe -fno-common -no-cpp-precomp 
-fno-strict-aliasing',
     optimize='-O3',
     cppflags='-no-cpp-precomp -pipe -fno-common -no-cpp-precomp 
-fno-strict-aliasing'
     ccversion='', gccversion='3.1 20020420 (prerelease)', 
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=8, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -flat_namespace -L/usr/local/lib'
     libpth=/usr/local/lib /usr/lib
     libs=-lgdbm -ldbm -lm -lc
     perllibs=-lm -lc
     libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true, 
libperl=libperl.dylib
     gnulibc_version=''
   Dynamic Linking:
     dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags=' -flat_namespace -bundle -undefined 
suppress -L/usr/local/lib'


Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under darwin
   Compiled at Aug 24 2002 14:44:56
   %ENV:
     PERL5DB="use Devel::DProf"
     PERL5OPT="-d:DProf"
     PERL_READLINE_NOWARN=""
   @INC:
     /Library/Perl/darwin
     /Library/Perl
     /Library/Perl/darwin
     /Library/Perl
     /Library/Perl


Re: DProf on Mac OS X

Posted by John Siracusa <si...@mindspring.com>.
On 7/26/03 2:01 AM, Ged Haywood wrote:
> Any way you can try it on a different OS, or even try a different Perl?
> And before Stas jumps on me *again* for saying that I have no evidence
> that 5.8.0 is the culprit in this case.  It just smells fishy to me.  :)

My next stop is Linux on x86, but I'd really like to get it working on OS X
if possible.

-John


Re: DProf on Mac OS X

Posted by Ged Haywood <ge...@www2.jubileegroup.co.uk>.
Hi there,

On Fri, 25 Jul 2003, John Siracusa wrote:

> Has anyone gotten this to work on OS X?
>  [snip]
> I've used this profiling technique on other Unix-like OSes, so I think 
> I'm doing it right.

I'm sure you're doing it right.

> But on OS X, I get a tiny tmon.out file that never grows after the
> initial server startup.  I don't see any error messages or log lines.
> 
> When I try to use Apache::DProf, I get a bus error on any request:
> 
> [Fri Jul 25 18:52:48 2003] [notice] child pid 3840 exit signal Bus 
> error (10)

I've never tried it on OS X, but I had exactly the same problem when
Perl 5.6 first came out.  I didn't investigate further since the Perl
development team were rather unhelpful about it.  And about quite a
lot of other things.  With hindsight that might be understandable,
they must have been taking a lot of flack about that time.

The problem persisted until I upgraded to 5.7.2.

Any way you can try it on a different OS, or even try a different Perl?
And before Stas jumps on me *again* for saying that I have no evidence
that 5.8.0 is the culprit in this case.  It just smells fishy to me.  :)

73,
Ged.