Re: better atomics - v0.2

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Peter Geoghegan <pg(at)heroku(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Ants Aasma <ants(at)cybertec(dot)at>
Subject: Re: better atomics - v0.2
Date: 2013-12-24 14:16:31
Message-ID: 20131224141631.GF26564@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-12-23 15:04:08 -0500, Robert Haas wrote:
> On Thu, Dec 5, 2013 at 6:39 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> > On 2013-11-19 10:37:35 -0500, Tom Lane wrote:
> >> Or does the warning
> >> mean code bloat (lots of useless copies of the inline function)?
> >
> > After thinking on that for a bit, yes that's a possible consequence, but
> > it's quite possible that it happens in cases where we don't get the
> > warning too, so I don't think that argument has too much bearing as I
> > don't recall a complaint about it.
>
> But I bet the warning we're getting there is complaining about exactly
> that thing. It's possible that it means "warning: i've optimized away
> your unused function into nothing" but I think it's more likely that
> it means "warning: i just emitted dead code". Indeed, I suspect that
> this is why that test is written that way in the first place.

I don't think that's particularly likely - remember, we're talking about
static inline functions here. So the compiler would have to detect that
there's an inline function which won't be used and then explicitly emit
a function body. That seems like an odd thing to do.
So, if there's compilers like that around, imo they have to deal with their
own problems. It's not like it will prohibit using postgres.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-12-24 14:19:34 Re: trailing comment ghost-timing
Previous Message Peter Eisentraut 2013-12-24 13:40:40 Re: ISN extension bug? (with patch)