Messages in this thread |  | | | Subject | Re: [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions | | From | Joe Perches <> | | Date | Fri, 09 Sep 2011 15:32:05 -0700 |
| |
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.
|  |