Subject: Re: saving string space in kernels [was: CVS commit: syssrc]
To: Simon Burge <simonb@wasabisystems.com>
From: Greg Oster <oster@cs.usask.ca>
List: tech-kern
Date: 12/13/2000 09:11:25
Simon Burge writes:
> How far should we take this? Looking at my 1.5 alpha kernel with
> RaidFrame I see some obvious ones:
[snip]
> thoreau:~ 15648> strings /netbsd | grep 'raidframe error at line %d file %s$'
> | wc
> 18 126 630
This is related to the RF_PANIC() macro, which I'm hoping to eliminate a
bunch of them... (there are 51 instances of RF_PANIC in the code).
> thoreau:~ 15649> strings /netbsd | grep 'raidframe error at line %d file %s '
> | wc
> 44 440 2508
This is related to the RF_ASSERT() macro... of which there are some 769
instances! It would be interesting to see how much smaller a kernel gets
by adding the line:
#define NOASSERT
to the beginning of sys/dev/raidframe/rf_general.h (and, of course,
comparing benchmarks of that new kernel against the old one would be
interesting too :) )
In any event, moving the 'sprintf()' calls from the RF_PANIC() and RF_ASSERT()
macros into their own function(s?) would help a lot here... I'll take care of
that :)
Later...
Greg Oster