Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 1998 16:27:14 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        Eivind Eklund <eivind@FreeBSD.ORG>
Cc:        FreeBSD Hackers <Hackers@FreeBSD.ORG>
Subject:   Re: DIAGNOSTICS and DEBUG LOGGING (was Re: cvs commit: src/sys/conf options)
Message-ID:  <Pine.SV4.3.95.980209160831.661B-100000@parkplace.cet.co.jp>
In-Reply-To: <19980209075127.63680@follo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.980209160831.661B-100000>