pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent lwlock dtrace probes from unnecessary work
2+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent lwlock dtrace probes from unnecessary work
@ 2021-05-03 10:18 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2021-05-03 10:18 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent lwlock dtrace probes from unnecessary work

If dtrace is compiled in but disabled, the lwlock dtrace probes still
evaluate their arguments.  Since PostgreSQL 13, T_NAME(lock) does
nontrivial work, so it should be avoided if not needed.  To fix, make
these calls conditional on the *_ENABLED() macro corresponding to each
probe.

Reviewed-by: Craig Ringer <craig.ringer@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/CAGRY4nwxKUS_RvXFW-ugrZBYxPFFM5kjwKT5O+0+Stuga5b4+Q@mail.gmail...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b94409a02f6122d77b5154e481c0819fed6b4c95

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 36 ++++++++++++++++++++++++------------
1 file changed, 24 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Prevent lwlock dtrace probes from unnecessary work
@ 2021-05-03 19:09 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2021-05-03 19:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent lwlock dtrace probes from unnecessary work

If dtrace is compiled in but disabled, the lwlock dtrace probes still
evaluate their arguments.  Since PostgreSQL 13, T_NAME(lock) does
nontrivial work, so it should be avoided if not needed.  To fix, make
these calls conditional on the *_ENABLED() macro corresponding to each
probe.

Reviewed-by: Craig Ringer <craig.ringer@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/CAGRY4nwxKUS_RvXFW-ugrZBYxPFFM5kjwKT5O+0+Stuga5b4+Q@mail.gmail...

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e48ce7ef0ef8de3d8e9e56be4d23d7830681b18b

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 39 ++++++++++++++++++++++++++-------------
1 file changed, 26 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-05-03 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-03 10:18 pgsql: Prevent lwlock dtrace probes from unnecessary work Peter Eisentraut <peter@eisentraut.org>
2021-05-03 19:09 pgsql: Prevent lwlock dtrace probes from unnecessary work Peter Eisentraut <peter@eisentraut.org>

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