public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* profiling under OSR5
@ 1997-12-17 19:11 Bill Walker
  1997-12-17 20:31 ` Robert Lipe
  0 siblings, 1 reply; 5+ messages in thread
From: Bill Walker @ 1997-12-17 19:11 UTC (permalink / raw)
  To: egcs

	Ah, heck.  Is there a trick to profiling a C program
under egcs-1.0 on OSR5.0.[24] ?

Bill

-- 
Bill Walker Ph.D.
Chairman, Dept. of Computer Science
East Central University
Ada, Oklahoma 74820-6899

e-mail:  bw@cs.ecok.edu 
phone:   580 332 8000 ext. 594
FAX:     580 332 4616


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: profiling under OSR5
  1997-12-17 19:11 profiling under OSR5 Bill Walker
@ 1997-12-17 20:31 ` Robert Lipe
  1997-12-18  8:28   ` Bill Walker
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Lipe @ 1997-12-17 20:31 UTC (permalink / raw)
  To: egcs

> 	Ah, heck.  Is there a trick to profiling a C program
> under egcs-1.0 on OSR5.0.[24] ?

I remember dancing around with this before 5.0.0 was released 
and punting on it completely at the time.  

There are two forms of profiling, block profiling and timer slice
profiling.   I think each of these is available in GNU-based and 
native-based tools (gprof/prof, lprof).   There wasn't any real
amount of rocket science in the target-specific end of the compiler 
itself, as I recall it was just going through the drudgery of 
getting the right startups, teardowns, and options passed around.
I had bigger fish to skin. (Or some cliche like that. :-)   Now that
we finally have something out the door that works pretty well, I will
more readily entertain working on stuff like this.

Tell us what you want, what you've tried, and what you've got and
I'm sure we can help make something work.

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: profiling under OSR5
  1997-12-17 20:31 ` Robert Lipe
@ 1997-12-18  8:28   ` Bill Walker
  1997-12-18 12:29     ` Robert Lipe
  0 siblings, 1 reply; 5+ messages in thread
From: Bill Walker @ 1997-12-18  8:28 UTC (permalink / raw)
  To: egcs

Robert Lipe writes:
> 
> > 	Ah, heck.  Is there a trick to profiling a C program
> > under egcs-1.0 on OSR5.0.[24] ?
> 
> I remember dancing around with this before 5.0.0 was released 
> and punting on it completely at the time.  
> 
> There are two forms of profiling, block profiling and timer slice
> profiling.   I think each of these is available in GNU-based and 
> native-based tools (gprof/prof, lprof).   There wasn't any real
> amount of rocket science in the target-specific end of the compiler 
> itself, as I recall it was just going through the drudgery of 
> getting the right startups, teardowns, and options passed around.
> I had bigger fish to skin. (Or some cliche like that. :-)   Now that
> we finally have something out the door that works pretty well, I will
> more readily entertain working on stuff like this.
> 
> Tell us what you want, what you've tried, and what you've got and
> I'm sure we can help make something work.
> 


	I really haven't put much into it yet.  The GNU profiler
"isn't supported on this platform", so I'm stuck with the 
SCO profiler for the moment.  If I
use egcs g++ with the "-p" option the resulting executable will produce a
"mon.out" file that the SCO profiler can work with, at least after a fashion.

	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 ...".

	Actually, not having a working profiler is fairly serious if the
compiler is to be used for "real problems" ... .   (Sorry --- I'm preaching
to the choir ... )


73 de Bill W5GFE



-- 
Bill Walker Ph.D.
Chairman, Dept. of Computer Science
East Central University
Ada, Oklahoma 74820-6899

e-mail:  bw@cs.ecok.edu 
phone:   580 332 8000 ext. 594
FAX:     580 332 4616


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: profiling under OSR5
  1997-12-18  8:28   ` Bill Walker
@ 1997-12-18 12:29     ` Robert Lipe
  1997-12-18 17:50       ` J. Kean Johnston
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Lipe @ 1997-12-18 12:29 UTC (permalink / raw)
  To: egcs

> 	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.

> 	Actually, not having a working profiler is fairly serious if the
> compiler is to be used for "real problems" ... .   (Sorry --- I'm preaching
> to the choir ... )

Yeah this is probably true.     But I was focusing on a compiler that 
*worked* on OpenServer first. :-)

RJL

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: profiling under OSR5
  1997-12-18 12:29     ` Robert Lipe
@ 1997-12-18 17:50       ` J. Kean Johnston
  0 siblings, 0 replies; 5+ messages in thread
From: J. Kean Johnston @ 1997-12-18 17:50 UTC (permalink / raw)
  To: egcs

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1997-12-18 17:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-17 19:11 profiling under OSR5 Bill Walker
1997-12-17 20:31 ` Robert Lipe
1997-12-18  8:28   ` Bill Walker
1997-12-18 12:29     ` Robert Lipe
1997-12-18 17:50       ` J. Kean Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).