[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200711171502.36478.vda.linux@googlemail.com>
Date: Sat, 17 Nov 2007 15:02:36 -0800
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Arjan van de Ven <arjan@...radead.org>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...x.de,
akpm@...ux-foundation.org
Subject: Re: [patch] Printk kernel version in WARN_ON
On Saturday 17 November 2007 10:15, Arjan van de Ven wrote:
> Hi,
>
> #define WARN_ON(condition) ({ \
> int __ret_warn_on = !!(condition); \
> if (unlikely(__ret_warn_on)) { \
> - printk("WARNING: at %s:%d %s()\n", __FILE__, \
> - __LINE__, __FUNCTION__); \
> + printk("WARNING: at %s:%d %s() (%s)\n", __FILE__, \
> + __LINE__, __FUNCTION__, UTS_RELEASE); \
> dump_stack(); \
> } \
> unlikely(__ret_warn_on); \
We have ~700 WARN_ONs in the tree. Adding UTS_RELEASE to printk
grows every one of them by at least 5 bytes.
I think it makes sense to move printk out-of-line, to
void print_WARN_ON_warning(const char *file, int line, const char *func);
This will save at least 10 bytes per WARN_ON.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists