From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24865 invoked from network); 21 May 1998 01:38:54 -0000 Received: from mescaline.gnu.org (we-refuse-to-spy-on-our-users@158.121.106.21) by mail2.redhat.com with SMTP; 21 May 1998 01:38:54 -0000 Received: from melange.gnu.org by mescaline.gnu.org (8.8.5/8.6.12GNU) with ESMTP id VAA26333 for ; Wed, 20 May 1998 21:38:53 -0400 Received: (burley@localhost) by melange.gnu.org (8.8.5/8.6.12GNU) id VAA21215; Wed, 20 May 1998 21:38:52 -0400 (EDT) Date: Wed, 20 May 1998 21:38:52 -0400 (EDT) Message-Id: <199805210138.VAA21215@melange.gnu.org> From: Craig Burley To: axp-list@redhat.com In-reply-to: <35634DD0.5BB0C0C6@paralleldata.com> (wsb@paralleldata.com) Subject: Re: gprof on mixed gcc/g77 code >Craig Burley wrote: >> >> >>From what I've used in the past, '-p' is for prof, '-pg' is for >> >gprof, and only gprof exists on my system. >> >> You're talking about the gcc and g77 commands there. What gcc and >> g77 accept for options is not always directly related to what >> the internal programs cc1 and f771 accept. There are some similarities, >> but it's incorrect to assume that any option you pass to gcc or g77 >> must necessarily be passed "unmolested" through to cc1 or f771 >> (or cc1plus or cc1obj, etc.). > >Wonderful. Another way to confuse a user. Well, users who might get confused shouldn't use -v -- or Fortran, gcc, or UNIX, etc. for that matter. :) But, if you have some recommendations, or, ideally, patches to offer to reduce this problem -- which, BTW, I don't recall seeing anybody else run into -- submit them to the appropriate address, by all means! I'm all for making products less confusing. Note that these patches/recommendations could target the docs, not necessarily the ways the products work. >I'm only looking at symptoms. I make no claims that what >I see and what is happening are necessarily related. All I can say is that your original email seemed to say exactly that. Chalk it up to a misunderstanding, I guess. >> Perhaps you should submit a bug report? Both g77 and gcc come >> with extensive documentation, including on how and where to >> file bug reports. > >I look at bug reports as a last option. With source, available, >that would be where I look first. Hmm, though you should be aware that, in effect, you submitted a bug report to a list that contains a small subset of the people who *normally* would see a properly submitted bug report, and thus excluded from your audience quite a number of people (especially if it was egcs-related) who might have been able to offer some real help that much quicker. At least, it looked to *me* like you were trying to submit a bug report saying `-p' was incorrectly passed to f771 instead of `-pg'. If anyone else disagrees, I hope they'll speak up; I could certainly use a lesson in how to avoid responding to bug reports that aren't, so I can spend more time getting productive work done. >The link shows gcrt1.o at the front and C profiles OK so >I think things are basically working. Question is what >is missing for FORTRAN. I'll do some more looking. >No obvious differences now. The xxx.o has _mcount in it, >and the link uses the correct gcrt1.o file. Maybe it's >a library issue? Maybe the egcs fix to profiling for the Alpha that you learned about after writing the above will address your problems, but I still would hazard a guess that something might be specially needed to make profiling work for Fortran, since you saw it work well (enough, anyway) for C code but not at all for Fortran code. It's a coincidence, though; I just got another profiling-related question from a completely different source regarding a special variant of g77 (for Solaris SPARC, not Alpha). Guess I might have to learn about profiling Fortran code after all. :) tq vm, (burley)