Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 1998 00:42:02 +0100
From:      Eivind Eklund <eivind@yes.no>
To:        ade@demon.net, Eivind Eklund <eivind@yes.no>
Cc:        current@FreeBSD.ORG
Subject:   Re: panics with SMP and NFS
Message-ID:  <19980311004202.49594@follo.net>
In-Reply-To: <E0yCYVv-0000tx-00@gorgon.lovett.com>; from Ade Lovett on Tue, Mar 10, 1998 at 05:32:47PM -0600
References:  <19980310235506.04127@follo.net> <E0yCYVv-0000tx-00@gorgon.lovett.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 10, 1998 at 05:32:47PM -0600, Ade Lovett wrote:
> Eivind Eklund writes:
> >
> >> Peeking at the code, it seems that this panic (and a bunch of other
> >> stuff) is only called if MAX_PERF is undefined -- sadly, no mention
> >> of MAX_PERF is made in any of the kernel config files (even LINT).
> >
> >I'll check with John and possibly add this as a commented out option
> >in LINT.
> 
> I'm just wondering how many other undocumented (at least, not
> mentioned in LINT) #ifdef's there are in the sys/ tree...

There are somewhere between 500 and 600 unmentioned symbols that are
checked by #if defined/#if !defined/ifdef/ifndef statements.

> Would it be useful if I did a scan over the current tree and produced
> a list of such "missing" options?

There isn't too much point in you going over them, as I've already got
a list, produced by the following little script and a little pipe with
awk, sort and uniq.

#!/usr/local/bin/perl

use strict;
my %symbols;
my $key;

while (<>) {
    if (/^[ \t]*\#[ \t]*ifn?def[ \t]+([A-Za-z_][A-Za-z_0-9]*)/) {
	$symbols{$1} = 1;
    } elsif (/[ \t]*\#[ \t]*if[ \t]/) {
	while (/defined[ \t]*\([ \t]*([A-Za-z_][A-Za-z_0-9]*)/g) {
	    $symbols{$1} = 1;
	}
    }
}

foreach $key (sort keys %symbols) {
    print "$key\n";
}


However, if you want to help me _remove_ the ifdefs, you're more than
welcome.  I committed a lengthy comment describing the preferred state
of affairs to conf/options earlier today; a non-mentioned point is
that options should generally go away, and be replaced with sysctls or
smarter code.  I'll accept patches to this effect, and make sure
they're reviewed and either committed or rejected (with the reasons
why) fairly quickly.

Eivind.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980311004202.49594>