From owner-freebsd-hackers Mon Feb 9 00:26:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA10694 for hackers-outgoing; Mon, 9 Feb 1998 00:16:56 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA10647; Mon, 9 Feb 1998 00:16:47 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [194.198.43.36]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id IAA07587; Mon, 9 Feb 1998 08:16:45 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.6/8.8.6) id JAA06344; Mon, 9 Feb 1998 09:16:44 +0100 (MET) Message-ID: <19980209091644.21614@follo.net> Date: Mon, 9 Feb 1998 09:16:44 +0100 From: Eivind Eklund To: Michael Hancock Cc: Eivind Eklund , FreeBSD Hackers Subject: Re: DIAGNOSTICS and DEBUG LOGGING (was Re: cvs commit: src/sys/conf options) References: <19980209075127.63680@follo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88e In-Reply-To: ; from Michael Hancock on Mon, Feb 09, 1998 at 04:27:14PM +0900 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Feb 09, 1998 at 04:27:14PM +0900, Michael Hancock wrote: > 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. Just to make this perfectly clear (I'm not certain if you got my meaning or not): Enabling INVARIANT_CODE will not add _any_ checks to the kernel. Instead, it will add the code that is necessary to enable any checks at will. If INVARIANT_CODE is defined for the entire kernel, then _ASSERTS or _INVARIANTS can be defined for any single file without any compilation trouble, even if _ASSERTS/_INVARIANTS isn't enabled for any other file. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe hackers" in the body of the message