[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10646.1393243751@warthog.procyon.org.uk>
Date: Mon, 24 Feb 2014 12:09:11 +0000
From: David Howells <dhowells@...hat.com>
To: Josh Triplett <josh@...htriplett.org>
Cc: dhowells@...hat.com, Arnd Bergmann <arnd@...db.de>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] bug: When !CONFIG_BUG, simplify WARN_ON_ONCE and family
Josh Triplett <josh@...htriplett.org> wrote:
> > This means we actually want BUG() to end with __builtin_unreachable()
> > as in the CONFIG_BUG=y case, and also ensure it actually is
> > unreachable. As I have shown in [1], the there is a small overhead
> > of doing this in terms of code size.
>
> I agree that allowing BUG() to become a no-op seems suboptimal, if only
> because of the resulting warnings and mis-optimizations. However, I
> think the overhead could be cut down massively, such that BUG() just
> compiles down to a one-byte undefined instruction. (__builtin_trap()
> might do the right thing here; worth checking.)
Is it possible to use an inline function with an empty body in this? Let the
compiler prune away all the arguments?
David
--
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