Re: [PATCH 1/4] dynamic_debug: consolidate repetitive struct_ddebug descriptor definitions

From: Joe Perches
Date: Fri Sep 09 2011 - 18:32:11 EST


On Fri, 2011-09-09 at 16:06 -0600, Jim Cromie wrote:
> The trick is then to allow those users to define flag-chars that they like
> (mnemonic value), and that work with the dynamic-debug mini-language
> implemented in $CONTROL reader.

I don't think that's a problem really.

I think a simple control/test variable as either value
or mask would work fine.

Take a single bit control to either test as mask
or test as level. No mnemonic letters needed.

pr_debug_mask(mask, fmt, ...)
pr_debug_level(level, fmt, ...)

could set the appropriate type bit in the struct
so the test works as appropriate.

echo 'value <foo>' > <debugfs>/dynamic_debug/control

> But that begs the question - is there a reason why __aligned(4)
> wouldnt work for 32 bit machines ? It would reduce the footprint
> for small machines.

No real idea why it's aligned(8). Jason?

> Also, what is your notion of level ?

Driver specific value.
Look at the _dbg uses in drivers/net/wireless/ath for example.
I believe there are only two types of uses in the kernel:
module debug level and module debug mask output controls.

> it is independent of the error,warning,info,debug levels correct ?

Yes. Attached to debug output only.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/