Subject: Re: DPRINTF in ?
To: Quentin Garnier <cube@cubidou.net>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-kern
Date: 03/16/2007 22:48:29
On Fri, 16 Mar 2007, Quentin Garnier wrote:

> On Fri, Mar 16, 2007 at 10:06:39AM +0000, Iain Hibbert wrote:
> > 	debug <attribute> [<level>]
>
> You don't mention where you intend to put such lines, in the
> specification part (files.*) or in the user-edited selection part.
>
> Guts says specification part (IMO, that's where it belongs anyway).

No, in the user edited..  so that it would be far easier to enable
debugging on a driver or module. Its often fiddly to enable debugging
output, as you have to find the correct source file to place the XXX_DEBUG
definition, and even then it doesn't always work properly.

I was not going to modify the files.* specifications - my thought was that
if this piggybacked on the attributes that are already used, they don't
need to be extended at all..

> [You want CTLFLAG_IMMEDIATE there, actually.]

ok

> 1. subsystems define their debug stuff in files.whatever
>    brought in along with the sysctl hierarchy when user do 'options
>    DEBUG'.  Note that the user still has fine-grained control over the
>    messages because it does the selection through sysctl.  However,
>    messages in all subsystems are potentially available.

Hmm, you mean to make a single 'options DEBUG' include debugging for *all*
subsytems in the kernel?

That would be an alternate destination than the one I had in mind, but it
would mean you could easily generate a GENERIC_DEBUG kernel, which would
potentially be more useful as long as performance did not suffer hugely.

in that case, a sysctl heirarchy could be built automagically based on
file names: "sysctl -w debug.dev.wscons.wsmouse=3" and no modification to
files.* need be made. Do you see something better?

iain