Re: [PATCH] a more efficient BUG() macro

J . A . Magallon (jamagallon@able.es)
Sat, 17 Feb 2001 17:37:51 +0100


On 02.17 Paul Gortmaker wrote:
> I was poking around in a vmlinux the other day and was surprised at the
> amount of repetitive crap text that was in there. For example, try:
>
> strings vmlinux|grep $PWD|wc -c
>
> which gets some 70KB in my case - depends on strlen($PWD) obviously. The
> culprit is BUG() in a static inline that is in a header file. In this
> case cpp expands __FILE__ to the full path of the header file in question.
> (IIRC there is a __BASEFILE__ that would be a better choice than __FILE__)
>

Or better __FUNCTION__. Or even better __func__ that is gcc and ANSI99 C
compatible.

Time to make a patch...

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.1-ac17 #1 SMP Sat Feb 17 01:47:56 CET 2001 i686

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/