public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: David Rowley <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Heikki Linnakangas <[email protected]>
Cc: [email protected]
Subject: Re: define pg_structiszero(addr, s, r)
Date: Fri, 1 Nov 2024 16:14:09 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <ZyR2Tzdmj9c6E/[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAHut+Pu9Un427eoPuEetNhk2PZe1-sgSxEuG_2OuTwtxC3cBOw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAApHDvrXzPAr3FxoBuB7b3D-okNoNA2jxLun1rW8Yw5wkbqusw@mail.gmail.com>
<ZyR2Tzdmj9c6E/[email protected]>
On Fri, Nov 01, 2024 at 06:33:51AM +0000, Bertrand Drouvot wrote:
> We could try to write a more elaborate version of pg_memory_is_all_zeros(), but
> as it looks like there is only one use case, then it's probably better to not
> implement (revert) this change here and "just" add a comment as to why pg_memory_is_all_zeros()
> should not be used here, thoughts?
>
> [0]: https://godbolt.org/z/xqnW4MPY5
Note that the two printf() calls make the code less optimized.
Anyway, I see the following from bufpage.s for these lines under -O2:
1) On HEAD at 07e9e28b56db:
.LVL306:
.loc 3 201 23 is_stmt 1 discriminator 1 view .LVU547
cmpq $1024, %rbx <- Yep, that's wrong.
jne .L417
2) On HEAD at 49d6c7d8daba:
.LVL299:
.loc 1 131 16 is_stmt 0 discriminator 1 view .LVU524
cmpq $8192, %rbx
je .L419
3) With the patch sent at [1]:
.LVL306:
.loc 3 201 23 is_stmt 1 discriminator 1 view .LVU545
cmpq $8192, %rbx
jne .L417
So it does not matter one way or another for 2) or 3), does it?
[1]: https://www.postgresql.org/message-id/[email protected]
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (36+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: define pg_structiszero(addr, s, r)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox