Re: [PATCH] Identify LWLocks in tracepoints

From: Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Identify LWLocks in tracepoints
Date: 2021-05-05 04:20:04
Message-ID: CAGRY4nwaiPJc8wO0G7WZCgBmATC3GJVgvBoADZHDbCzhj8zTPw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 5 May 2021 at 09:15, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com> wrote:

>> warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
>> 1322 | TRACE_POSTGRESQL_LWLOCK_WAIT_START(T_NAME(lock), mode);
>> | ^
>
> Odd that I didn't get that.

This compiler complaint is not due to the _ENABLED() test as such.
It's due to the fact that we completely define out the
TRACE_POSTGRESQL_ macros with src/backend/utils/Gen_dummy_probes.sed .

While explicit braces could be added around each test, I suggest
fixing Gen_dummy_probes.sed to emit the usual dummy statement instead.
Patch attached.

Attachment Content-Type Size
v1-0001-Emit-dummy-statements-for-probes.d-probes-when-di.patch text/x-patch 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-05-05 05:13:11 Re: Small issues with CREATE TABLE COMPRESSION
Previous Message Justin Pryzby 2021-05-05 03:56:01 Re: AlterSubscription_refresh "wrconn" wrong variable?