Re: [PATCH] Identify LWLocks in tracepoints - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] Identify LWLocks in tracepoints
Date
Msg-id 20210504221531.cfvpmmdfsou6eitb@alap3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] Identify LWLocks in tracepoints  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: [PATCH] Identify LWLocks in tracepoints
Re: [PATCH] Identify LWLocks in tracepoints
List pgsql-hackers
Hi,

On 2021-05-03 21:06:30 +0200, Peter Eisentraut wrote:
> On 30.04.21 05:22, Craig Ringer wrote:
> > On Thu, 29 Apr 2021 at 15:31, Peter Eisentraut
> > <peter.eisentraut@enterprisedb.com> wrote:
> > > > So if you could produce a separate patch that adds the
> > > > _ENABLED guards targeting PG14 (and PG13), that would be helpful.
> > > 
> > > Here is a proposed patch for this.
> > 
> > LGTM.
> > 
> > Applies and builds fine on master and (with default fuzz) on
> > REL_13_STABLE. Works as expected.
> 
> committed

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);
      |                                                          ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1345:57: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1345 |    TRACE_POSTGRESQL_LWLOCK_WAIT_DONE(T_NAME(lock), mode);
      |                                                         ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1355:54: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1355 |   TRACE_POSTGRESQL_LWLOCK_ACQUIRE(T_NAME(lock), mode);
      |                                                      ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c: In function ‘LWLockConditionalAcquire’:
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1407:64: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1407 |    TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE_FAIL(T_NAME(lock), mode);
      |                                                                ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1415:59: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1415 |    TRACE_POSTGRESQL_LWLOCK_CONDACQUIRE(T_NAME(lock), mode);
      |                                                           ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c: In function ‘LWLockAcquireOrWait’:
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1488:59: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1488 |     TRACE_POSTGRESQL_LWLOCK_WAIT_START(T_NAME(lock), mode);
      |                                                           ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1507:58: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1507 |     TRACE_POSTGRESQL_LWLOCK_WAIT_DONE(T_NAME(lock), mode);
      |                                                          ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1538:68: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1538 |    TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT_FAIL(T_NAME(lock), mode);
      |                                                                    ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1547:63: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1547 |    TRACE_POSTGRESQL_LWLOCK_ACQUIRE_OR_WAIT(T_NAME(lock), mode);
      |                                                               ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c: In function ‘LWLockWaitForVar’:
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1708:66: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1708 |    TRACE_POSTGRESQL_LWLOCK_WAIT_START(T_NAME(lock), LW_EXCLUSIVE);
      |                                                                  ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1728:65: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1728 |    TRACE_POSTGRESQL_LWLOCK_WAIT_DONE(T_NAME(lock), LW_EXCLUSIVE);
      |                                                                 ^
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c: In function ‘LWLockRelease’:
/home/andres/src/postgresql/src/backend/storage/lmgr/lwlock.c:1855:48: warning: suggest braces around empty body in an
‘if’statement [-Wempty-body]
 
 1855 |   TRACE_POSTGRESQL_LWLOCK_RELEASE(T_NAME(lock));

In a build without the trace stuff enabled.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: MaxOffsetNumber for Table AMs
Next
From: Peter Smith
Date:
Subject: Re: AlterSubscription_refresh "wrconn" wrong variable?