Re: [PATCHES] Dynamic Tracing docs
Re: [PATCHES] Dynamic Tracing docs
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Simon Riggs wrote: > Enclose new trace.sgml file as discussed on -docs. I have a question here, regarding this: To include DTrace support in a 64-bit binary, specify --enable-dtrace and DTRACEFLAGS="-64" to configure. The dtrace documentation says that dtrace automatically picks the right build environment. Something is wrong here. Either the dtrace documentation or ours. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Re: [PATCHES] Dynamic Tracing docs
От:
"Simon Riggs" <simon@2ndquadrant.com>
Дата:
On Sat, 2006-12-02 at 09:43 +0100, Peter Eisentraut wrote: > Simon Riggs wrote: > > Enclose new trace.sgml file as discussed on -docs. > > I have a question here, regarding this: > > To include DTrace support in a 64-bit binary, specify --enable-dtrace > and DTRACEFLAGS="-64" to configure. > > The dtrace documentation says that dtrace automatically picks the right > build environment. Something is wrong here. Either the dtrace > documentation or ours. I didn't presume to question Robert's technical notes http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in Robert, Can you throw any light on this? Or do you have any further comments on the docs? http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html -- Simon Riggs EnterpriseDB http://www.enterprisedb.com
Re: [PATCHES] Dynamic Tracing docs
От:
Zdenek Kotala <Zdenek.Kotala@Sun.COM>
Дата:
Simon Riggs napsal(a): > On Sat, 2006-12-02 at 09:43 +0100, Peter Eisentraut wrote: >> Simon Riggs wrote: >>> Enclose new trace.sgml file as discussed on -docs. >> I have a question here, regarding this: >> >> To include DTrace support in a 64-bit binary, specify --enable-dtrace >> and DTRACEFLAGS="-64" to configure. >> >> The dtrace documentation says that dtrace automatically picks the right >> build environment. Something is wrong here. Either the dtrace >> documentation or ours. > > I didn't presume to question Robert's technical notes > http://blogs.sun.com/robertlor/entry/user_level_dtrace_probes_in > > Robert, Can you throw any light on this? Or do you have any further > comments on the docs? > http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html > I'm not dtrace guru, but I think that main reason for 64-bit flag is that dtrace generates header file/code for probes during preprocessing time and it don't know nothing about compiler switch. The probe code/ data structure is different on 32/64-bit. However, if you run dtrace script that dtrace detects automatically "build environment" (if binary is 32 or 64bits). Robert, please correct me if I wrong. Zdenek
Re: [PATCHES] Dynamic Tracing docs
От:
Robert Lor <Robert.Lor@Sun.COM>
Дата:
Simon Riggs wrote On 12/02/06 06:50,:
>Robert, Can you throw any light on this? Or do you have any further
>comments on the docs?
>http://developer.postgresql.org/pgdocs/postgres/dynamic-trace.html
>
>
Here is what the dtrace man page says about the -32 and -64 flags:
The D compiler produces programs using the native data
model of the operating system kernel. You can use the
isainfo -b command to determine the current operating
system data model. If the -32 option is specified,
dtrace forces the D compiler to compile a D program
using the 32-bit data model. If the -64 option is speci-
fied, dtrace forces the D compiler to compile a D pro-
gram using the 64-bit data model. These options are typ-
ically not required as dtrace selects the native data
model as the default. The data model affects the sizes
of integer types and other language properties. D pro-
grams compiled for either data model can be executed on
both 32-bit and 64-bit kernels. The -32 and -64 options
also determine the ELF file format (ELF32 or ELF64) pro-
duced by the -G option.
In my testing on the 64 bit Solaris kernel building a 64-bit Postgres
binary, if DTRACEFLAGS="-64" is not passed to the configure script,
compilation will fail when dtrace is invoked. Based on my observation,
dtrace will default to 32-bit, but for 64-bit you have to be explicit
with DTRACEFLAGS="-64"
Simon, thanks for you help with the doc patch!
Regards,
-Robert