From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
Date: Mon, 10 Oct 2022 15:20:08 -0400
Message-ID: <140401.1665429608@sss.pgh.pa.us> (raw)
In-Reply-To: <20221009212937.GC900071@nathanxps13>
References: <3928703.1665345117@sss.pgh.pa.us>
<20221009210148.GA900071@nathanxps13>
<3943009.1665349719@sss.pgh.pa.us>
<20221009212937.GC900071@nathanxps13>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
In-Reply-To: <140401.1665429608@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox