linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Jimi Xenidis <jimix@watson.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	paulus@samba.org, Hollis Blanchard <hollisb@us.ibm.com>,
	ppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: [POWERPC] mark BUG() as noreturn
Date: Fri, 22 Sep 2006 10:54:05 +1000	[thread overview]
Message-ID: <1158886446.8109.2.camel@localhost.localdomain> (raw)
In-Reply-To: <135B477D-5DF8-48E9-94FD-A114A4526177@watson.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

On Thu, 2006-09-21 at 08:18 -0400, Jimi Xenidis wrote:
> On Sep 21, 2006, at 12:55 AM, Stephen Rothwell wrote:
> 
> > From an idea from Michael Ellerman.
> >
> > We finish the BUG() macro with a call to a function marked with  
> > attribute
> > "noreturn" so that the compiler will know that BUG() and BUG_ON()
> > (with a constant, non-zero argument) will not return.
> 
> But BUG() _can_ return, if I have a probe, xmon or kgdb configured it  
> is possible  to play with the state of the world and try to continue/ 
> recover, (xmon "x" command).  IMHO, this is a powerful debugging  
> scenario.

Hmm, ok I hadn't thought of that. Personally I've never tried to recover
from a BUG(), do people really do that much?

> Why are we concerned with the performance of this anyway?

Not so much the performance, more that it gives the compiler more
information about what's happening and allows it to elide code in some
circumstances - but it's not _that_ important.

Having it configurable might be an option, dunno.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-09-22  0:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-05  2:08 [POWERPC] merge iSeries i/o operations with the rest Stephen Rothwell
2006-09-05  5:07 ` David Woodhouse
2006-09-05  5:39   ` Stephen Rothwell
2006-09-05 16:41 ` Linas Vepstas
2006-09-05 23:19   ` Stephen Rothwell
2006-09-06  8:24 ` Stephen Rothwell
2006-09-18  5:38 ` Stephen Rothwell
2006-09-20 12:15   ` Stephen Rothwell
2006-09-20 16:01     ` Hollis Blanchard
2006-09-21  0:03       ` Stephen Rothwell
2006-09-21  0:20         ` Michael Ellerman
2006-09-21  4:55           ` [POWERPC] mark BUG() as noreturn Stephen Rothwell
2006-09-21 12:18             ` Jimi Xenidis
2006-09-22  0:54               ` Michael Ellerman [this message]
2006-09-22  1:34                 ` Amos Waterland
2006-09-22 10:58                 ` Jimi Xenidis
2006-09-21 13:23             ` David Howells
2006-09-21 15:15               ` Segher Boessenkool
2006-09-21  8:00         ` [POWERPC] merge iSeries i/o operations with the rest Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1158886446.8109.2.camel@localhost.localdomain \
    --to=michael@ellerman.id.au \
    --cc=hollisb@us.ibm.com \
    --cc=jimix@watson.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).