From owner-freebsd-current Mon Jan 6 5:29: 1 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97DE037B401 for ; Mon, 6 Jan 2003 05:29:00 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B00E343EB2 for ; Mon, 6 Jan 2003 05:28:59 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h06DSqHj018869 for ; Mon, 6 Jan 2003 14:28:52 +0100 (CET) (envelope-from phk@freebsd.org) To: current@freebsd.org Subject: HOWTO: Basic-block profiling on -current. From: Poul-Henning Kamp Date: Mon, 06 Jan 2003 14:28:52 +0100 Message-ID: <18868.1041859732@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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-current" in the body of the message