From: "Wes Bauske" <wsb@paralleldata.com>
To: axp-list@redhat.com
Subject: Re: gprof on mixed gcc/g77 code
Date: Wed, 20 May 1998 21:56:20 -0500 [thread overview]
Message-ID: <356397D4.E80C0705@paralleldata.com> (raw)
In-Reply-To: 199805210138.VAA21215@melange.gnu.org
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
next prev parent reply other threads:[~1998-05-21 2:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-20 8:56 gprof on mixed gcc/g77 code Wes Bauske
1998-05-20 15:13 ` Craig Burley
1998-05-20 18:44 ` Wes Bauske
1998-05-20 19:03 ` Craig Burley
1998-05-20 21:40 ` Wes Bauske
1998-05-21 1:38 ` Craig Burley
1998-05-21 2:56 ` Wes Bauske [this message]
1998-05-21 3:55 ` Craig Burley
1998-05-21 4:32 ` Wes Bauske
1998-05-21 5:37 ` Maurice Hilarius
1998-05-21 15:26 ` Craig Burley
[not found] <199805201453.IAA23638@ellpspace.math.ualberta.ca>
1998-05-20 21:45 ` Wes Bauske
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox