Re: How to build static, and with gprof enabled

[email protected] (John Hinsdale) 15 Apr 2002 08:46:14 -0700
Newsgroups gmane.comp.mozilla.builds
Organization http://groups.google.com/
Message-ID <[email protected]>
>> [John Hinsdale]
   >> I would like to enable compiling of everything for
   >> use with the GNU profiler, gprof (i.e., I want to

 > [Chris Seawood]
 > Either pass the flags into --enable-optimize or set CFLAGS/CXXFLAGS in 
 > your .mozconfig file.
 > ...
 >  We don't support doing a fully static build (don't ask).  The options 
 > that you want are --disable-shared --enable-static.

Chris - thanks for this tips.  Since I posted my inquiry, I've
decided to table trying to use gprof for now, and instead I'm
going to first try a profiler called FncCheck developed by
Yannick Perret of Lyon, France.  Yannick's profiler appears to
provide much of what gprof does but also works in the presence
of threads, fork()ing, use of shared libraries (i.e., all relevent
for Mozilla).  It works by using GCC's "-finstrument-functions"
option.

I've also got a way to enable compiling w/ FncCheck in a way
that is completely transparent to the Mozilla build process (it
involves simply replacing gcc and c++ with wrappers that do what
FncCheck needs w/out interacting w/ the Mozilla build at all.

So hopefully I don't need gprof (which has limitations) nor
a static build, nor to change the Mozilla build process at all.

This is good because one of the things I want to do is an analysis
of "where the time goes" for Mozilla in its default build, when
no customization at all is done.  My theory is that most users,
esp. new ones, will do this.

I'll keep you posted.

	--jh