From owner-freebsd-doc Mon Jan 6 5:55:46 2003 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE8F237B401 for ; Mon, 6 Jan 2003 05:55:44 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC1E343EB2 for ; Mon, 6 Jan 2003 05:55:43 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h06DtaHj019119 for ; Mon, 6 Jan 2003 14:55:36 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: docs@freebsd.org Subject: doc/handbook/something fodder... Date: Mon, 06 Jan 2003 14:55:36 +0100 Message-ID: <19118.1041861336@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I have no idea where this belongs in our doc, but it should go somewhere I think. Poul-Henning I have committed the bits needed to use GCC's basicblock profiling on -current. Make sure to recompile the kernbb(8) program first. Here's an simple example how to profile a single file (vfs_bio.c): cd /sys/i386/conf config YOURKERNEL cd ../compile/YOURKERNEL make depend && make all rm vfs_bio.o make vfs_bio.o DEBUG="--test-coverage --profile-arcs" make all && make install reboot # run your test. kernbb cd /sys/i386/compile/YOURKERNEL gcov vfs_bio.c # examine vfs_bio.c.gcov If you want to profile multiple files, you just give them all the same treatment as vfs_bio. It's perfectly possible to profile the entire kernel if you want to. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message