From owner-cvs-all@FreeBSD.ORG Wed Sep 22 17:25:14 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B71216A4E0; Wed, 22 Sep 2004 17:25:14 +0000 (GMT) Received: from telecom.net.et (sparrow.telecom.net.et [213.55.64.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5724E43D3F; Wed, 22 Sep 2004 17:25:10 +0000 (GMT) (envelope-from mtm@identd.net) Received: from [213.55.68.240] (HELO rogue.acs.lan) by telecom.net.et (CommuniGate Pro SMTP 3.4.8) with ESMTP id 57968635; Wed, 22 Sep 2004 20:18:04 +0300 Received: by rogue.acs.lan (Postfix, from userid 1000) id 1B557B86E; Wed, 22 Sep 2004 20:25:20 +0300 (EAT) Date: Wed, 22 Sep 2004 20:25:20 +0300 From: Mike Makonnen To: Brooks Davis Message-ID: <20040922172519.GB14929@rogue.acs.lan> References: <200409220859.i8M8xgwb022928@repoman.freebsd.org> <20040922130052.GA3407@green.homeunix.org> <20040922150105.GA17806@odin.ac.hmc.edu> <20040922153007.GA91347@green.homeunix.org> <20040922163810.GA28683@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040922163810.GA28683@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD/6.0-CURRENT (i386) cc: Brian Fundakowski Feldman cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: useful developer habits and aids (was Re: cvs commit: src/sys/net if.c) X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2004 17:25:14 -0000 On Wed, Sep 22, 2004 at 09:38:10AM -0700, Brooks Davis wrote: > > > > No hard feelings, since I'm used to having a new issue or two every kernel > > upgrade, but this really should be a lesson to anyone listening that kernel > > development without INVARIANTS (and sometimes WITNESS) is a big no-no. > > Yah, I've added INVARIANTS back to my laptop kernel in perforce to avoid > this particular mistake in the future. I usually don't like running with full debuging and even just invariants sometimes. But when I touch anything in the kernel it's nice to be able to have a debug kernel arround without recompiling. So, I use the following two scripts: http://people.freebsd.org/~mtm/build http://people.freebsd.org/~mtm/installkernel My build setup is essentially like this: /usr/a/conf /usr/a/logs /usr/a/src /usr/a/obj /usr/src is symlinked to /usr/a/src /usr/obj is symlinked to /usr/a/obj In /usr/a/conf are my kernel configuration files. Currently I have a KERNEL KERNEL_DBG and KERNEL_PERF KERNEL only has invariants KERNEL_DBG has invariants, witness, and mutex debugging turned on KERNEL_PERF has no invariants, no witness, and no debugging. The following two commands will automatically build all my kernels and install them: build -r /usr/a -k -K GENERIC,KERNEL,KERNEL_DBG,KERNEL_PERF installkernel -K GENERIC,KERNEL,KERNEL_DBG,KERNEL_PERF I usually have KERNEL or KERNEL_PERF set as my default kernel in /boot/loader.conf, but switching to any of the others is easy. When I touch anything in the kernel I just have to switch to KERNEL_DBG and don't have to bother recompiling a debug kernel that may or may not be out-of-sync with the kernel I'm currently running. On my 2.4Ghz laptop the whole process takes a little over an hour. Also, it helps to have a larger than usual root partition :-) I'd be interested in hearing other people's ideas on how they reduce development hassels. Actually I'd like to hear about any type of usefull development habits. Cheers -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !