Re: [patch 1/3] dynamic printk - core infrastructure

From: Joe Perches
Date: Wed Apr 02 2008 - 14:59:42 EST


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.

--
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/