From owner-freebsd-current Wed Oct 23 14:25:41 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA12637 for current-outgoing; Wed, 23 Oct 1996 14:25:41 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA12631 for ; Wed, 23 Oct 1996 14:25:38 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA10485; Wed, 23 Oct 1996 14:22:19 -0700 From: Terry Lambert Message-Id: <199610232122.OAA10485@phaeton.artisoft.com> Subject: Re: Is profiling code broken? To: sgk@troutmask.apl.washington.edu (Steven G. Kargl) Date: Wed, 23 Oct 1996 14:22:19 -0700 (MST) Cc: freebsd-current@FreeBSD.org In-Reply-To: <199610232042.NAA05182@troutmask.apl.washington.edu> from "Steven G. Kargl" at Oct 23, 96 01:42:54 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > 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.