Re: Simplifying our Trap/Assert infrastructure
| От | Tom Lane |
|---|---|
| Тема | Re: Simplifying our Trap/Assert infrastructure |
| Дата | |
| Msg-id | 140401.1665429608@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Simplifying our Trap/Assert infrastructure (Nathan Bossart <nathandbossart@gmail.com>) |
| Список | pgsql-hackers |
Nathan Bossart <nathandbossart@gmail.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
В списке pgsql-hackers по дате отправления: