From owner-freebsd-current@FreeBSD.ORG Sat Dec 1 20:23:24 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F42516A41A for ; Sat, 1 Dec 2007 20:23:24 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.freebsd.org (Postfix) with ESMTP id 2120113C45A for ; Sat, 1 Dec 2007 20:23:24 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id lB1KNLG7022811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 1 Dec 2007 12:23:21 -0800 X-Auth-Received: from [128.208.5.12] (shiina-1.dyn.cs.washington.edu [128.208.5.12]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.09) with ESMTP id lB1KNLNS005709 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sat, 1 Dec 2007 12:23:21 -0800 In-Reply-To: <20071201195631.GB31644@ace.netcins.ceid.upatras.gr> References: <20071201165946.GA13320@ace.netcins.ceid.upatras.gr> <20071201191324.GA90389@ace.netcins.ceid.upatras.gr> <20071201195631.GB31644@ace.netcins.ceid.upatras.gr> Mime-Version: 1.0 (Apple Message framework v752.2) X-Gpgmail-State: !signed Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <10067684-C58D-4672-BF42-28B4E6287153@u.washington.edu> Content-Transfer-Encoding: 7bit From: Garrett Cooper Date: Sat, 1 Dec 2007 12:22:06 -0800 To: Nikos Ntarmos X-Mailer: Apple Mail (2.752.2) X-PMX-Version: 5.3.3.310218, Antispam-Engine: 2.5.2.313940, Antispam-Data: 2007.12.1.120347 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __LINES_OF_YELLING 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0' Cc: current@freebsd.org Subject: Re: gprof's broken in 7-CURRENT 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: Sat, 01 Dec 2007 20:23:24 -0000 On Dec 1, 2007, at 11:56 AM, Nikos Ntarmos wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sat, Dec 01, 2007 at 11:22:37AM -0800, Garrett Cooper wrote: >> Strange. Maybe there are some inconsistencies between my system and >> an up-to-date system, or maybe I'm just using gprof incorrectly. >> Could you show me how you ran pkg_info with gprof please? > > The steps I took: > 1. Add 'CFLAGS+=-pg' to /etc/make.conf > 2. cd /usr/src/usr.sbin/pkg_install && make obj && make depend && > make clean && make > 4. The profiled pkg_foo executables now reside in the corresponding > /usr/obj/usr/src/usr.sbin/pkg_install/foo directories. For > pkg_info, > that would be .../pkg_install/info/. You can run them from there > (that's what I did) or 'make install' to put them in /usr/sbin/. > 5. sudo /usr/obj/usr/src/usr.sbin/pkg_install/info/pkg_info -a >/ > dev/null > That will leave a pkg_info.gmon in /var/db/pkg// > (due > to the chdir(2) thingie I mentioned earlier). > 6. gprof /usr/obj/usr/src/usr.sbin/pkg_install/info/pkg_info > /path/to/pkg_info.gmon > > \n\n > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.4 (FreeBSD) > Comment: Nikos Ntarmos > > iD8DBQFHUbxvm6J1ac+VFgoRAoKLAKCPFmNwVVZs5tMjLdVh6CwxN9p2eQCfbat4 > /PCIADECwh2PQch3+Rcdqqk= > =4RLW > -----END PGP SIGNATURE----- Well, that was a bit more than I was expecting, but thank you though :). -Garrett