From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent lwlock dtrace probes from unnecessary work
Date: Mon, 03 May 2021 19:09:55 +0000
Message-ID: <E1lddx5-0001Jw-G8@gemulon.postgresql.org> (raw)
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(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Prevent lwlock dtrace probes from unnecessary work
In-Reply-To: <E1lddx5-0001Jw-G8@gemulon.postgresql.org>
References: <E1lddx5-0001Jw-G8@gemulon.postgresql.org>
* 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