From owner-freebsd-current@FreeBSD.ORG Sat Dec 1 19:56:35 2007 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 4BD7D16A420 for ; Sat, 1 Dec 2007 19:56:35 +0000 (UTC) (envelope-from ntarmos@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id B4D0E13C45A for ; Sat, 1 Dec 2007 19:56:34 +0000 (UTC) (envelope-from ntarmos@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id C1AC3EB4DAF for ; Sat, 1 Dec 2007 21:56:33 +0200 (EET) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id A7F8E158C52 for ; Sat, 1 Dec 2007 21:56:33 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TtE-SRK8gI+k for ; Sat, 1 Dec 2007 21:56:33 +0200 (EET) Received: from ace.netcins.ceid.upatras.gr (vfppp079167010191.dsl.hol.gr [79.167.10.191]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 4B6A0158C21 for ; Sat, 1 Dec 2007 21:56:33 +0200 (EET) Received: by ace.netcins.ceid.upatras.gr (Postfix, from userid 1001) id 6E9B43F457; Sat, 1 Dec 2007 21:56:31 +0200 (EET) Date: Sat, 1 Dec 2007 21:56:31 +0200 From: Nikos Ntarmos To: FreeBSD Current Message-ID: <20071201195631.GB31644@ace.netcins.ceid.upatras.gr> Mail-Followup-To: FreeBSD Current References: <20071201165946.GA13320@ace.netcins.ceid.upatras.gr> <20071201191324.GA90389@ace.netcins.ceid.upatras.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: Organization: NetCInS Lab., C.E.I.D., U. of Patras, Greece WWW-Homepage: http://ntarmos.dyndns.org/ X-PGP-Fingerprint: 9680 60A7 DE60 0298 B1F0 9B22 9BA2 7569 CF95 160A Office-Phone: +30-2610-996919 Office-Fax: +30-2610-969011 GPS-Info: 38.31N, 21.82E User-Agent: mutt-ng/devel-r804 (FreeBSD) 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 19:56:35 -0000 -----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-----