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

J . A . Magallon
2001-02-17T16:38:16Z

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