Re: BUGed to death

Dave Jones (davej@codemonkey.org.uk)
Mon, 14 Apr 2003 22:02:16 +0100


On Mon, Apr 14, 2003 at 10:40:41PM +0200, Duncan Sands wrote:

> You would think that the compiler would consider a branch leading to
> ud2 (i.e. BUG()) to be "unlikely", but it doesn't seem to. Maybe some
> improvement can be made there.

BUG_ON is already marked unlikely.
See include/linux/kernel.h

The costs here are doing the actual checks, nothing to do with
the branch prediction.

Dave

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