[lkml]   [2014]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RESEND] bug: When !CONFIG_BUG, simplify WARN_ON_ONCE and family
Josh Triplett <> 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?


 \ /
  Last update: 2014-02-24 13:41    [W:0.054 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site