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 <[email protected]> Discussion: https://www.postgresql.org/message-id/cagry4nwxkus_rvxfw-ugrzbyxpffm5kjwkt5o+0+stuga5b...@mail.gmail.com 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(-)
