Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 May 2013 15:57:39 +0400
From:      Sevan / Venture37 <venture37@gmail.com>
To:        freebsd-questions@freebsd.org
Cc:        pgsql@FreeBSD.org
Subject:   DTrace support in Postgresql not working
Message-ID:  <51864933.7040601@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi guys,
I have a system running 10-CURRENT (r250217) which I've built Postgresql 
9.2.4 with DTrace support enabled on & a VM running 9.1-STABLE (r250009) 
which I'm unable to build it on.

On 10-CURRENT the problem is that dtrace -l does not list the postgresql 
provider.
My make.conf on both system is
STRIP=
CFLAGS+=-fno-omit-frame-pointer

on 9.1-STABLE the build fails with
Assertion failed: (nrc == rc), function _libelf_resync_sections, file 
/usr/src/lib/libelf/elf_update.c, line 341.
gmake: *** [utils/probes.o] Abort trap: 6 (core dumped)
gmake: *** Deleting file 'utils/probes.o'
*** [do-build] Error code 2


on 10-CURRENT there are warnings generated but the build completes & 
installs


pgstat.c:2538:36: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_STATEMENT_STATUS(cmd_str);

../../../src/include/utils/probes.h:424:42: note: expanded from macro 
'TRACE_POSTGRESQL_STATEMENT_STATUS' 
__dtrace_postgresql___statement__status(arg0)

../../../src/include/utils/probes.h:803:59: note: passing argument to 
parameter here extern void __dtrace_postgresql___statement__status(char *);

postgres.c:559:37: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_PARSE_START(query_string);

../../../src/include/utils/probes.h:316:44: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_PARSE_START' 
__dtrace_postgresql___query__parse__start(arg0)

../../../src/include/utils/probes.h:731:61: note: passing argument to 
parameter here
extern void __dtrace_postgresql___query__parse__start(char *);
postgres.c:582:36: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_PARSE_DONE(query_string);

../../../src/include/utils/probes.h:307:43: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_PARSE_DONE' 
__dtrace_postgresql___query__parse__done(arg0)

../../../src/include/utils/probes.h:725:60: note: passing argument to 
parameter here extern void 
__dtrace_postgresql___query__parse__done(char *);
postgres.c:603:39:  warning: passing 'const char *' to parameter of 
type 'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_REWRITE_START(query_string);

../../../src/include/utils/probes.h:352:46: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_REWRITE_START' 
__dtrace_postgresql___query__rewrite__start(arg0)

../../../src/include/utils/probes.h:755:63: note: passing argument to 
parameter here extern void 
__dtrace_postgresql___query__rewrite__start(char *);

postgres.c:621:38: warning: passing 'const char *' to parameter of 
type 'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_REWRITE_DONE(query_string);

../../../src/include/utils/probes.h:343:45: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_REWRITE_DONE' 
__dtrace_postgresql___query__rewrite__done(arg0)

../../../src/include/utils/probes.h:749:62: note: passing argument to 
parameter here extern void 
__dtrace_postgresql___query__rewrite__done(char *);

postgres.c:643:39: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_REWRITE_START(query_string);

../../../src/include/utils/probes.h:352:46: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_REWRITE_START' 
__dtrace_postgresql___query__rewrite__start(arg0)

../../../src/include/utils/probes.h:755:63: note: passing argument to
parameter here extern void 
__dtrace_postgresql___query__rewrite__start(char *);

postgres.c:670:38: warning: passing 'const char *' to parameter of 
type 'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_REWRITE_DONE(query_string);

../../../src/include/utils/probes.h:343:45: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_REWRITE_DONE' 
__dtrace_postgresql___query__rewrite__done(arg0)

../../../src/include/utils/probes.h:749:62: note: passing argument to 
parameter here extern void 
__dtrace_postgresql___query__rewrite__done(char *);
                   ^
postgres.c:845:31: warning: passing 'const char *' to parameter of type 
'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_START(query_string);

../../../src/include/utils/probes.h:361:37: note: expanded from macro 
'TRACE_POSTGRESQL_QUERY_START' __dtrace_postgresql___query__start(arg0)

../../../src/include/utils/probes.h:761:54: note: passing argument to 
parameter here extern void __dtrace_postgresql___query__start(char *);
postgres.c:1130:30: warning: passing 'const char *' to parameter of 
type 'char *' discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers] 
TRACE_POSTGRESQL_QUERY_DONE(query_string);

../../../src/include/utils/probes.h:280:36: note: expanded from 
macro 'TRACE_POSTGRESQL_QUERY_DONE' __dtrace_postgresql___query__done(arg0)

../../../src/include/utils/probes.h:707:53: note: passing argument to 
parameter here extern void __dtrace_postgresql___query__done(char *);


& more

If I force CC to gcc, I receive the following warnings

gcc -O2 -pipe -fno-omit-frame-pointer -fno-strict-aliasing -Wall 
-Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement 
-Wendif-labels -Wmissing-format-attribute -Wformat-security 
-fno-strict-aliasing -fwrapv -I../../../src/include -I/usr/local/include 
-I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include 
-I/usr/local/include  -c -o postgres.o postgres.c
postgres.c: In function 'pg_parse_query':
postgres.c:559: warning: passing argument 1 of 
'__dtrace_postgresql___query__parse__start' discards qualifiers from 
pointer target type
postgres.c:582: warning: passing argument 1 of 
'__dtrace_postgresql___query__parse__done' discards qualifiers from 
pointer target type
postgres.c: In function 'pg_analyze_and_rewrite':
postgres.c:603: warning: passing argument 1 of 
'__dtrace_postgresql___query__rewrite__start' discards qualifiers from 
pointer target type
postgres.c:621: warning: passing argument 1 of 
'__dtrace_postgresql___query__rewrite__done' discards qualifiers from 
pointer target type
postgres.c: In function 'pg_analyze_and_rewrite_params':
postgres.c:643: warning: passing argument 1 of 
'__dtrace_postgresql___query__rewrite__start' discards qualifiers from 
pointer target type
postgres.c:670: warning: passing argument 1 of 
'__dtrace_postgresql___query__rewrite__done' discards qualifiers from 
pointer target type
postgres.c: In function 'exec_simple_query':
postgres.c:845: warning: passing argument 1 of 
'__dtrace_postgresql___query__start' discards qualifiers from pointer 
target type
postgres.c:1130: warning: passing argument 1 of 
'__dtrace_postgresql___query__done' discards qualifiers from pointer 
target type


regards


Sevan / Venture37



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51864933.7040601>