v1-0001-Emit-dummy-statements-for-probes.d-probes-when-di.patch
text/x-patch
Filename: v1-0001-Emit-dummy-statements-for-probes.d-probes-when-di.patch
Type: text/x-patch
Part: 0
Patch
Format: format-patch
Series: patch v1-0001
Subject: Emit dummy statements for probes.d probes when disabled
| File | + | − |
|---|---|---|
| src/backend/utils/Gen_dummy_probes.sed | 1 | 0 |
From a1ca7d752b56717854cc47b31cd299e651de0430 Mon Sep 17 00:00:00 2001
From: Craig Ringer <craig.ringer@2ndquadrant.com>
Date: Wed, 5 May 2021 12:06:10 +0800
Subject: [PATCH v1] Emit dummy statements for probes.d probes when disabled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When building without --enable-dtrace, emit dummy
do {} while (0)
statements for the stubbed-out TRACE_POSTGRESQL_foo() macros
instead of empty macros that totally elide the original probe
statement.
This fixes the
warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
introduced by b94409a02f.
---
src/backend/utils/Gen_dummy_probes.sed | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/backend/utils/Gen_dummy_probes.sed b/src/backend/utils/Gen_dummy_probes.sed
index aa3db59cce..6e29d86afa 100644
--- a/src/backend/utils/Gen_dummy_probes.sed
+++ b/src/backend/utils/Gen_dummy_probes.sed
@@ -19,5 +19,6 @@ s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2,
s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6)/
s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7)/
s/([^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\}, [^,)]\{1,\})/(INT1, INT2, INT3, INT4, INT5, INT6, INT7, INT8)/
+s/$/ do {} while (0)/
P
s/(.*$/_ENABLED() (0)/
--
2.30.2