Request for review 7170638: Use DTRACE_PROBE[N] in JNI Set and SetStatic Field.
Mark Wielaard
mjw at redhat.com
Mon Oct 1 14:24:27 PDT 2012
On Mon, Oct 01, 2012 at 04:49:21PM -0400, Coleen Phillimore wrote:
> I have another question. You check for the presence of
> /usr/include/sys/sdt.h to set DTRACE_ENABLED.
Yes, see the last paragraph of the original submission to see why
I chose that method of testing:
http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005739.html
Basically because that looked most like what the existing
make/solaris/dtrace.make and vm.make files did.
> Is this file
> installed with gcc versions 4.5+ or can it be installed with a
> latest version of linux?
I am not entirely sure what you mean by "latest version of linux".
But the SystemTap package provides sys/sdt.h (in particular the
systemtap-sdt-devel sub-package).
The header file is described here:
http://tromey.com/blog/?p=687
http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation
Although it is installed by the Systemtap package, it isn't really
tied to Systemtap. It really just implements the SDT macros and
when included and compiled into an application that uses those
macros any application (stap, gdb, etc) that can read the ELF
probes notes section can use them.
> Is dtrace only supported with gcc 4.5+ or
> only supported with a version of linux that enables this?
I don't believe dtrace is supported with any version of gcc,
but I don't really know anything about dtrace.
The sys/sdt.h header (for C++) uses some features of GCC 4.5+.
(For plain C older GCC versions can be used, but hotspot is all C++.)
> If we upgraded our tool chains to be gcc 4.5+ (4.7) does that mean
> we might enable this? Or is it tied to the linux version? Does
> this question make sense?
I am not sure I understand the question. If you mean by "linux" the
kernel then the answer is that it doesn't depend in any way on the
kernel version. If you upgrade your toolchain to GCC 4.5+ and install
the sys/sdt.h header, then you can enable this.
Cheers,
Mark
More information about the hotspot-dev
mailing list