Re: [PATCH] Identify LWLocks in tracepoints

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
Cc: Craig Ringer <craig.ringer@enterprisedb.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-05-08T15:04:01Z
Lists: pgsql-hackers
On 05.05.21 00:15, Andres Freund wrote:
> I'm now getting
> 
> /home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c: In function ‘LWLockAcquire’:
> /home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1322:58: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
>   1322 |    TRACE_POSTGRESQL_LWLOCK_WAIT_START(T_NAME(lock), mode);
>        |                                                          ^

For clarification, -Wempty-body is not part of the default warnings, right?

And even if I turn it on explicitly, I don't get this warning.  I read 
something that newer compilers don't warn in cases of macro expansion.

What compiler are you using in this situation?




Commits

  1. Emit dummy statements for probes.d probes when disabled

  2. Prevent lwlock dtrace probes from unnecessary work

  3. doc: Fix typo in logicaldecoding.sgml.

  4. Move lwlock-release probe back where it belongs

  5. Remove bogus tracepoint

  6. Simplify LWLock tranche machinery by removing array_base/array_stride.

  7. Improve LWLock scalability.