From owner-freebsd-current@FreeBSD.ORG Thu Jan 13 17:12:04 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93056106566C for ; Thu, 13 Jan 2011 17:12:04 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 764738FC17 for ; Thu, 13 Jan 2011 17:12:04 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id p0DHC4rN032577 for ; Thu, 13 Jan 2011 09:12:04 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id p0DHC4dC032576 for freebsd-current@freebsd.org; Thu, 13 Jan 2011 09:12:04 -0800 (PST) (envelope-from sgk) Date: Thu, 13 Jan 2011 09:12:04 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Message-ID: <20110113171139.GA32250@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: Profiling code execution on amd64? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2011 17:12:04 -0000 How does one profile one's code on freebsd-amd64? It seems that gprof is broken. troutmask:kargl[234] time ../penetration CPU time: 7.327 min Start time: 2011-01-13 08:59:18.419 Stop time: 2011-01-13 09:06:39.082 CPU time: 7.34 min 440.68 real 440.25 user 0.11 sys troutmask:kargl[235] gprof -b -l ../penetration penetration.gmon | more granularity: each sample hit covers 4 byte(s) for 0.00% of 25.46 seconds % cumulative self self total time seconds seconds calls ms/call ms/call name 96.2 24.48 24.48 282440 0.09 0.09 __mempoolm_MOD_memadd [4] 1.4 24.84 0.35 0 100.00% _mcount [5] 0.7 25.03 0.19 1 188.65 188.82 __srfm_MOD_rms [6] 0.5 25.14 0.12 608847 0.00 0.00 memcpy [11] I cannot reconcile how 440.25 seconds is the same a 25.46. Should src/usr.bin/gprof be disconnected from the build? -- Steve