| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Simplifying our Trap/Assert infrastructure |
| Date: | 2022-10-10 19:20:08 |
| Message-ID: | 140401.1665429608@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> On Sun, Oct 09, 2022 at 05:08:39PM -0400, Tom Lane wrote:
>> Something I thought about but forgot to mention in the initial email:
>> is it worth sprinkling these macros with "unlikely()"?
> I don't see why not.
I experimented with that, and found something that surprised me:
there's a noticeable code-bloat effect. With the patch as given,
$ size src/backend/postgres
text data bss dec hex filename
9001199 86280 204496 9291975 8dc8c7 src/backend/postgres
but with unlikely(),
$ size src/backend/postgres
text data bss dec hex filename
9035423 86280 204496 9326199 8e4e77 src/backend/postgres
I don't quite understand why that's happening, but it seems to
show that this requires some investigation of its own. So for
now I just pushed the patch as-is.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-10-10 19:35:16 | Re: Reducing the chunk header sizes on all memory context types |
| Previous Message | Melanie Plageman | 2022-10-10 18:48:49 | Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?) |