This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: profiling under OSR5
On Thu, Dec 18, 1997 at 10:53:09AM -0600, Robert Lipe wrote:
> > If I use "-p" with plain old egcs gcc, the "mon.out" file is not
> > produced at all. Hence, my question about "is there a trick ...".
>
> My guess is that comparing 'gcc -v' between the two modes (the one
> that works and the one that doesn't) will offer some hints about startup
> or teardown files that differ. If you can help analyze that, we can
> probably figure out the missing voodoo in sco5.h that builds the specs
> stuff.
Ok, here's the scoop on profiling. Compiling with -p will probably insert
some profiling stuff. I know I link with the correct pcrt1.o and friends.
That portion is all correct. What is unknown is whether the profiling code
that is emitted is correct, and whether or not it produces things in the
right format for prof to deal with.
Completely asside from all of that, what would the BEST solution is to
make -pg work. This would involve us crafting a gcrt0.o. gprof works,
despite the cygnus configure stuff claiming it doesn't. It compiles
cleanly and will do The Right Thing if we can make the compiler produce
the correct profiling information.
So, the two things to do are:
a) Make sure the compiler is emitting the correct stuff
b) craft a gcrt0.o which does the correct initialization for OSR5.
Kean.