Messages in this thread | | | Subject | Re: [patch 1/3] dynamic printk - core infrastructure | From | Joe Perches <> | Date | Wed, 02 Apr 2008 11:58:05 -0700 |
| |
On Wed, 2008-04-02 at 14:21 -0400, Jason Baron wrote: > On Tue, Apr 01, 2008 at 07:07:24PM -0700, Joe Perches wrote: > > On Tue, 2008-04-01 at 14:47 -0700, Randy Dunlap wrote: > > > > echo "add file.c" > /sys/kernel/debug/dynamic_printk/files > > > > echo "remove file.c" > /sys/kernel/debug/dynamic_printk/files > > I think this would be better by module rather than filename. > > KBUILD_MODNAME would be a better choice. > agreed. i think 'KBUILD_MODNAME" provides a better interface. The original > implementation was using complete source pathnames, so they were unique. Are > 'KBUILD_MODNAME's unique?
Yes, not by file, but by groups of compilation units that make up a module. I think that's more sensible anyway.
I also have patches to pr_<level> that allow for dynamic prefixing of KBUILD_MODNAME, __FUNCTION__, and __LINE__ that might be a useful addition to a facility such as yours.
These patches also make the kernel smaller by removing the direct uses of __FILE__/__FUNCTION__/__func__ from pr_<level>.
I intend to post them during the next merge window.
| |