Date: Mon, 9 Feb 1998 09:16:44 +0100 From: Eivind Eklund <eivind@yes.no> To: Michael Hancock <michaelh@cet.co.jp> Cc: Eivind Eklund <eivind@FreeBSD.ORG>, FreeBSD Hackers <Hackers@FreeBSD.ORG> Subject: Re: DIAGNOSTICS and DEBUG LOGGING (was Re: cvs commit: src/sys/conf options) Message-ID: <19980209091644.21614@follo.net> In-Reply-To: <Pine.SV4.3.95.980209160831.661B-100000@parkplace.cet.co.jp>; from Michael Hancock on Mon, Feb 09, 1998 at 04:27:14PM %2B0900 References: <19980209075127.63680@follo.net> <Pine.SV4.3.95.980209160831.661B-100000@parkplace.cet.co.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980209091644.21614>