From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Unimpressed with pg_attribute_always_inline |
Date: | 2018-01-08 23:36:04 |
Message-ID: | 20180108233604.72xdpsdv3a5e2iui@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018-01-05 00:11:19 +1300, Thomas Munro wrote:
> On Tue, Jan 2, 2018 at 4:58 PM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> > On Tue, Jan 2, 2018 at 4:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> gaur | nodeHashjoin.c:167: warning: `always_inline' attribute directive ignored
> >> mastodon | .\src\backend\executor\nodeHashjoin.c(165): warning C4141: 'inline' : used more than once
> >
> > 1. MSVC doesn't like you to say both "__forceinline" and "inline".
> >
> > 2. GCC 2.95.3 doesn't understand always_inline. From a quick look at
> > archived manuals, it seems that that attribute arrived in 3.1.
>
> Here is one way to fix those warnings. Thoughts?
That looks good to me.
> >> Therefore, I think that pg_attribute_always_inline is not merely
> >> useless but actively bad, and should be removed.
>
> How about a macro PG_NOINLINE, which, if defined, inhibits this? Or I
> could give up this strategy and maintain two separate very similar
> functions, ExecHashJoin and ExecParallelHashJoin.
Unless this pg_attribute_always_inline gets a lot more widely
proliferated I don't see a need to change anything. Debuggability isn't
meaningfully impacted by seing more runtime attributed to
ExecHashJoin/ExecParallelHashJoin rather than ExecHashJoinImpl. If this
were used on functions that are called from a lot of places that
argument would hold some weight, but for now I'm really not seing it.
- Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-01-08 23:50:33 | Re: Condition variable live lock |
Previous Message | Andres Freund | 2018-01-08 23:29:59 | Re: [HACKERS] [PATCH] Generic type subscripting |