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

2012-09-19 Thread Andriy Gapon
on 19/09/2012 02:01 Attilio Rao said the following: On Tue, Sep 18, 2012 at 8:07 PM, Andriy Gapon a...@freebsd.org wrote: on 18/09/2012 19:50 Attilio Rao said the following: On 9/18/12, Andriy Gapon a...@freebsd.org wrote: Here is a snippet that demonstrates the issue on a supposedly fully

Re: fdgrowtable() cleanup

2012-09-19 Thread Konstantin Belousov
On Tue, Sep 18, 2012 at 05:46:23PM +0200, Dag-Erling Sm??rgrav wrote: The patch below my signature improves the legibility of fdgrowtable(), and adds comments explaining the hairier bits. The only functional change is that the code no longer overwrites the old fileflags array when the old

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 a...@freebsd.org wrote: on 19/09/2012 02:01 Attilio Rao said the following: On Tue, Sep 18, 2012 at 8:07 PM, Andriy Gapon a...@freebsd.org wrote: on 18/09/2012 19:50 Attilio Rao said the following: On 9/18/12, Andriy Gapon a...@freebsd.org wrote:

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 the

Re: NDEBUG and assert()

2012-09-19 Thread Erik Cederstrand
Den 19/09/2012 kl. 11.19 skrev Erik Cederstrand e...@cederstrand.dk: 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

Re: NDEBUG and assert()

2012-09-19 Thread Garrett Cooper
On Wed, Sep 19, 2012 at 3:18 AM, Erik Cederstrand e...@cederstrand.dk wrote: Den 19/09/2012 kl. 11.19 skrev Erik Cederstrand e...@cederstrand.dk: The below below patch will let the analyzer reason correctly about the code, and removes the report mentioned above (and a handful others in

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 a...@freebsd.org 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

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Smørgrav d...@des.no 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

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 kostik...@gmail.com writes: Dag-Erling Sm??rgrav d...@des.no writes: + otable = fdp-fd_ofiles; + ofileflags = fdp-fd_ofileflags; These two new calculations could be unused if the function return

Re: fdgrowtable() cleanup

2012-09-19 Thread Dag-Erling Smørgrav
Konstantin Belousov kostik...@gmail.com writes: Dag-Erling Smørgrav d...@des.no 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