Messages in this thread |  | | | Date | Mon, 12 Sep 2011 10:47:18 -0400 | | From | Jason Baron <> | | Subject | Re: [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions |
| |
On Fri, Sep 09, 2011 at 03:32:05PM -0700, Joe Perches 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? >
I think when I first implemented it, I noticed that subsystems that did similar things, set aligned(8) in include/asm-generic/vmlinux.lds.h. For example, FTRACE_EVENTS() sets ALIGN(8)...I know that not a great reason thouh :( Don't remember if I tried ALIGN(4), but if it saves space, we can look at it...
Also, as I mentioned before, we probably need an extra array of pointers into the dynamic debug structures. see: https://lkml.org/lkml/2011/1/26/463.
thanks,
-Jason
|  |