This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to profile gfortran code?


> 
> On Mon, Nov 28, 2005 at 10:18:24AM -0500, Jack Howarth wrote:
> >     Can anyone describe the procedure for profiling gfortran code
> > using the typical gnu devtools? While I could run Shark on MacOS X
> > I was going to first try with the normal approach to profiling which
> > subroutines in xplor-nih are most used in the gfortran build compared
> > to the xlf build. Of course, on Darwin we don't have the option of
> > using valgrind. Thanks in advance for any pointers on how to get
> > started with this.
> >         Jack
> 
> Does darwin have gprof?  If so, you can add tha -pg flag
> to your gfortran flags.
> 
> gfortran -pg -O -o z z.f90
> ./z
> gprof -l -b z gmon.prof | more

gprof is now adays is not that good of profiler at all as it
only tells you what functions are the heavy setters and not
where in the function or even if an inlined function is the issue.

-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]