From owner-freebsd-hackers Mon Feb 9 00:24:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA28976 for hackers-outgoing; Sun, 8 Feb 1998 23:28:07 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA28895; Sun, 8 Feb 1998 23:27:54 -0800 (PST) (envelope-from michaelh@cet.co.jp) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.8/CET-v2.2) with SMTP id HAA01349; Mon, 9 Feb 1998 07:27:14 GMT Date: Mon, 9 Feb 1998 16:27:14 +0900 (JST) From: Michael Hancock To: Eivind Eklund cc: FreeBSD Hackers Subject: Re: DIAGNOSTICS and DEBUG LOGGING (was Re: cvs commit: src/sys/conf options) In-Reply-To: <19980209075127.63680@follo.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 9 Feb 1998, Eivind Eklund wrote: > On Mon, Feb 09, 1998 at 03:23:45PM +0900, Michael Hancock wrote: > > Eivind, > > > > I'd like to see "sanity checks" (assertions) and diagnostic logging > > separated. DIAGNOSTICS turns on both, but I'd like to be able to run an > > assertion checking kernel without all the logging. > > Absolutely agreed. I was thinking of > > _ASSERTS - Enable precondition and other cheap assertions > _INVARIANTS - Enable invariant/postcondition checking (expensive) > INVARIANT_CODE - Compile in invariant functions. So we have 3 levels of "sanity checking" with increasing levels of cost. I like it, it's a good fit to how people want to use assertions in practice. > DIAGNOSTIC - Messages to help tracing errors; non-overwhelming amount. > DDB - Debug functions in GDB These leaves us with 3 categories of debugging flags; sanity checks, logging/tracing, and GDB environment specific. This shouldn't be too difficult to adopt. If the scheme is acceptable to others, I will contribute some time moving sanity checks out of DIAGNOSTICS. Regards, Mike Hancock -- michaelh@cet.co.jp http://www.cet.co.jp CET Inc., Daiichi Kasuya BLDG 8F, 2-5-12 Higashi Shinbashi, Minato-ku, Tokyo 105 Japan Tel: +81-3-3437-1761 Fax: +81-3-3437-1766 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe hackers" in the body of the message