From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 20333 invoked from network); 21 May 1998 02:49:33 -0000 Received: from smtp.paralleldata.com (HELO paralleldata.com) (38.153.145.2) by mail2.redhat.com with SMTP; 21 May 1998 02:49:33 -0000 Received: by paralleldata.com from localhost (router,SLMail V2.5); Wed, 20 May 1998 21:50:29 -0500 Received: by paralleldata.com from paralleldata.com (208.252.48.36::mail daemon; unverified,SLMail V2.5); Wed, 20 May 1998 21:50:26 -0500 Sender: "Wsb" Message-ID: <356397D4.E80C0705@paralleldata.com> Date: Wed, 20 May 1998 21:56:20 -0500 From: "Wes Bauske" Organization: PDS Inc. X-Mailer: Mozilla 4.04 [en] (X11; U; Linux 2.0.31 i686) MIME-Version: 1.0 To: axp-list@redhat.com Subject: Re: gprof on mixed gcc/g77 code References: <199805210138.VAA21215@melange.gnu.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Craig Burley wrote: > > >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. > Switching '-pg' to '-p' muddies the waters. Why pick a flag already associated with different meaning from the users point of view? Only reason I see is that gxx does not intend to ever support the old mode and so just changed it's meaning to the new mode of profiling in the internal code. The docs should definitely stop referencing the prof binary since it seems to have disappeared though. If I see a need to submit a bug report, I will. Not to the point yet that I understand what's wrong. Once I do, I'll let the appropriate folks know. For now I'm just looking to see if anyone else has had better luck with it than I have. So far, it doesn't look like it. At least no one admits they have... Maybe they don't give a sh*t... > >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. Here is what I said: "I've got binaries where I mix C/FORTRAN and am trying to gprof them on a RH5.0 system. Strictly C programs appear to profile fine after adding the '-pg' flag to the compile/link. However, when I add this flag to g77, it seems to convert it to '-p'. Not what I want to have happen. Is this what it does?? If so, why??" Looks to me like I asked if this is normal and if so WHY? Since I know '-p' is different from '-pg', I noticed it was doing something that looked odd. English... great language to communicate in.... Think you implied the inverse of my statement about '-p'. No where did I say gcc didn't do that. I just said what I observed g77 doing.... > > >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. :) > egcs1.0.3a is no better than 1.0.2. Still studying the problem and leaning toward a library problem of some sort, like more than one version of _mcount being around and not being compatible with each other. (a guess.... not a bug report) Wes