On Fri, 2011-05-13 at 19:18 +0200, Bart Van Assche wrote: > On Fri, May 13, 2011 at 6:44 PM, Joe Perches <[email protected]> wrote: > > On Fri, 2011-05-13 at 09:18 -0700, Roland Dreier wrote: > >> From: Roland Dreier <[email protected]> > >> [Dave please do not apply even if this ends up in netdev patchwork!] > >> diff --git a/drivers/infiniband/core/netlink.c > >> b/drivers/infiniband/core/netlink.c > > [] > >> +#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__ > > Using #define pr_fmt(fmt) KBUILD_MODNAME ":%s: " fmt, __func__ > > generally produces smaller overall object size, especially > > at 64 bit. > > For instance, here's the size of netlink.o at 32 bit: > > $ size drivers/infiniband/core/netlink.o.* > > text data bss dec hex filename > > 2663 153 736 3552 de0 drivers/infiniband/core/netlink.o.old > > 2640 153 736 3529 dc9 drivers/infiniband/core/netlink.o.new > > Also, I rarely find __func__ useful in message output. > > It may be more useful for active development/debugging. > A recent dynamic debug patch made it possible to enable/disable at > runtime whether or not the function name (and more) should be included > in the output. See also http://lwn.net/Articles/434833/ for more > information.
One long term goal for me is a generic run-time mechanism to prefix all pr_<level> uses not just the <foo>_dbg ones with or without module or function name. It will also allow the removal of all the uses of #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt New #define pr_fmt lines need to be added to the current files that use pr_<level> without a prefix so it could take awhile. Eventually. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
