Subject: Re: DEBUG/DIAGNOSTIC/LOCKDEBUG by default
To: None <tech-kern@netbsd.org>
From: Matthew Mondor <mm_lists@pulsar-zone.net>
List: tech-kern
Date: 11/06/2007 14:29:54
On Tuesday, 6 Nov 2007 9:18:35
Adam Hamsik <haaaad@gmail.com> wrote:
> IMHO something like boot -c debug/lockdebug... doesn't hurt and
> should be useable for everyone. if you need debug you can turn it
> on at boot.
> is it possible to do this or we have to change to much code for
> this?
A possible issue might be performance, considering that as a compile
option macros may be used which generate no code at all when compiled
without debugging support.
A boot option might need for empty function stubs, checks against
NULL function pointer or boolean option variable in
performance-critical paths, which could no longer heavily use
assert/diagnostic features unless the functionality could still
completely be disabled at compile-time.
If you want to be able to disable it temporarily for kernels compiled
with diagnostic/debug support only, this would be no problem, yet you
already may have a kernel compiled with diagnostic/debug and one
compiled without, and can already select which one to boot via the
bootloader...
Such a boot option would only have the advantage of having the same
text size being used with or without diagnostics
--
Matthew Mondor