Date: Sat, 1 Dec 2007 21:56:31 +0200 From: Nikos Ntarmos <ntarmos@ceid.upatras.gr> To: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: gprof's broken in 7-CURRENT Message-ID: <20071201195631.GB31644@ace.netcins.ceid.upatras.gr> In-Reply-To: <A4F76BFD-E5BB-462A-ABA1-BE79FDC88469@u.washington.edu> References: <C2D2A8C6-8B39-4359-B968-0B52786B12EB@u.washington.edu> <20071201165946.GA13320@ace.netcins.ceid.upatras.gr> <20071201191324.GA90389@ace.netcins.ceid.upatras.gr> <A4F76BFD-E5BB-462A-ABA1-BE79FDC88469@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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/<last port name>/ (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 <ntarmos@ceid.upatras.gr>
iD8DBQFHUbxvm6J1ac+VFgoRAoKLAKCPFmNwVVZs5tMjLdVh6CwxN9p2eQCfbat4
/PCIADECwh2PQch3+Rcdqqk=
=4RLW
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071201195631.GB31644>
