Re: ule+smp: small optimization for turnstile priority lending

2012-09-19 Thread Attilio Rao
On Wed, Sep 19, 2012 at 7:03 AM, Andriy Gapon wrote: > on 19/09/2012 02:01 Attilio Rao said the following: >> On Tue, Sep 18, 2012 at 8:07 PM, Andriy Gapon wrote: >>> on 18/09/2012 19:50 Attilio Rao said the following: On 9/18/12, Andriy Gapon wrote: > > Here is a snippet that demon

NDEBUG and assert()

2012-09-19 Thread Erik Cederstrand
Hello, I'm sifting through the Clang Analyzer reports and decided to take a look at this one: http://scan.freebsd.your.org/freebsd-head/lib.ncurses.menu/2012-09-16-amd64/report-3vc5Zu.html#Path5 If you mouseover the assert() in line 236, the problem is that assert() resolves to "(void)0" so th

Re: NDEBUG and assert()

2012-09-19 Thread Erik Cederstrand
Den 19/09/2012 kl. 11.19 skrev Erik Cederstrand : > The below below patch will let the analyzer reason correctly about the code, > and removes the report mentioned above (and a handful others in ncurses). It > doesn't touch contrib code, but I'm not happy about changing include/assert.h > since

Re: NDEBUG and assert()

2012-09-19 Thread Garrett Cooper
On Wed, Sep 19, 2012 at 3:18 AM, Erik Cederstrand wrote: > Den 19/09/2012 kl. 11.19 skrev Erik Cederstrand : > >> The below below patch will let the analyzer reason correctly about the code, >> and removes the report mentioned above (and a handful others in ncurses). It >> doesn't touch contrib

Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash

2012-09-19 Thread John Baldwin
On Thursday, September 13, 2012 12:14:49 pm Mark Felder wrote: > On Thu, 13 Sep 2012 10:11:28 -0500, Andriy Gapon wrote: > > > Just curious - does VMWare provide a remote debugger support (gdb stub)? > > I'm not aware of one. What I have been able to successfully do is break > into the debugge

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov writes: > "Dag-Erling Smørgrav" writes: > > + otable = fdp->fd_ofiles; > > + ofileflags = fdp->fd_ofileflags; > These two new calculations could be unused if the function return early. I assume you mean assignments, not calculations. I trust the compiler to move them to

Re: fdgrowtable() cleanup

2012-09-19 Thread Konstantin Belousov
On Wed, Sep 19, 2012 at 02:58:02PM +0200, Dag-Erling Sm??rgrav wrote: > Konstantin Belousov writes: > > "Dag-Erling Sm??rgrav" writes: > > > + otable = fdp->fd_ofiles; > > > + ofileflags = fdp->fd_ofileflags; > > These two new calculations could be unused if the function return early. > > I assu

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov writes: > "Dag-Erling Smørgrav" writes: > > I assume you mean assignments, not calculations. I trust the compiler > > to move them to where they are needed - a trivial optimization with SSA. > It is a dereference before the assignment, so I perceive it as the > calculation. N