Re: Compiler warnings with --enable-dtrace
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-05-12T02:24:41Z
Lists: pgsql-hackers
On Mon, May 7, 2018 at 9:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@enterprisedb.com> writes: >> --enable-dtrace produces compiler warnings about const correctness, >> except on macOS. That's because Apple's dtrace produces function >> declarations in probes.h that take strings as const char * whereas >> AFAIK on all other operating systems they take char * (you can see >> that possibly recent difference in Apple's version of dt_header_decl() >> in dt_program.c). People have complained before[1]. > > Yeah, it's a bit annoying, although AFAICT hardly anyone uses dtrace. You're probably right about that, but the "--enable-dtrace" configure option is another matter. I started to use it for release builds on my personal Linux system a few months back, though not because I am a SystemTap user. lwn.net had a great (subscriber only) article just today about new Linux tooling for USDT probes [1]. The BPF/BCC + USDT stuff only became available in the last year or so. It seems like a technology that has the potential to be enormously useful for debugging complex production issues, while still being relatively easy to use. The BCC "trace" utility [2] can be used to produce simple one-liners that spit out interesting information about a running Postgres instance. It seems to be surprisingly low overhead in many cases. I've been meaning to do a write-up on all of this to make it more accessible, though it's already quite accessible. [1] https://lwn.net/Articles/753601/ [2] https://github.com/iovisor/bcc/blob/master/tools/trace_example.txt -- Peter Geoghegan
Commits
-
Suppress compiler warnings when building with --enable-dtrace.
- 513ff52e8167 11.0 landed