Date: Wed, 23 Oct 1996 14:22:19 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: sgk@troutmask.apl.washington.edu (Steven G. Kargl) Cc: freebsd-current@FreeBSD.org Subject: Re: Is profiling code broken? Message-ID: <199610232122.OAA10485@phaeton.artisoft.com> In-Reply-To: <199610232042.NAA05182@troutmask.apl.washington.edu> from "Steven G. Kargl" at Oct 23, 96 01:42:54 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> program t > implicit none > double precision x, f > integer i, j > external f > > do 1 i =1, 1000 > do 2 j = 1, 1000 > x = f(dble(i)) > 2 continue > 1 continue > end I would expect the second do loop to be removed by a decent optimizer; ij is not a dependent variable. Maybe the back end changed to 2.7.2 or the default optimization flags have changed in the compilation script? > double precision function f(x) > double precision x > integer i > do 3 i = 1, 100 > f = x / 2.d0 > 3 continue > return > end I would expect this second do loop to fall out as well. > There appears to be about 11 seconds missing from the time command > that should be accounted for by gprof. Inline functions for which exported symbols aren't generated will be static. This could be hidden in your dble() call... > Additionally, I noticed that the profiled libraries built during a > make world use a -p flag instead of -pg. Why? We do not currently > have prof(1) in the source tree. g is debugging information; you don't need it for profiling? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610232122.OAA10485>