[PATCH 0 of 3] Add support for dtrace compatible sdt probes on GNU/Linux

Mark Wielaard mjw at redhat.com
Thu May 10 06:49:05 PDT 2012


The following three patches enable support for dtrace compatible sdt probes
on GNU/Linux. Most of the support was already submitted earlier. These are
just the last three things left in IcedTea that actually enable it in
hotspot. It has been in production use for some time already.

The patches could be applied all as one, or individually if you want to be
able to test them independently.

The first patch is just a consistency cleanup patch. The JNI Set and
SetStatic Field methods used HS_DTRACE_PROBE_CDECL_N and HS_DTRACE_PROBE_N
directly instead of just using DTRACE_PROBE[N] like all other JNI methods.
This doesn't matter for the Solaris macros, but on GNU/Linux the macros
don't use direct function declarations (which is introduced in the second

The second patch introduces the DTRACE macros for use with the GNU/Linux
SystemTap provided sys/sdt.h. Like Solaris this uses USDT1, but using
macros instead of function declaractions. So it just adds a check for
is only needed there) and defines HS_DTRACE_PROBE[N] for the LINUX case.

The last patch enables the support in the build. I took the approach
used in the make/solaris/dtrace.make and vm.make file with a test to
see whether sys/sdt.h is available or not and printing a notice when
they are not found. In IcedTea there is a more elaborate configure
check to see if a small C++ program can be build with DTRACE probes
in it, but that looked like overkill here.

Patches in separate emails.



The second patch adds the actual
 src/share/vm/prims/jni.cpp        |  11 ++------
 src/share/vm/utilities/dtrace.hpp |  50 ++++++++++++++++++++++++++++++++++++++-
 make/linux/makefiles/dtrace.make  |  24 ++++++++++++++++++
 make/linux/makefiles/vm.make      |   2 +-
 4 files changed, 77 insertions(+), 10 deletions(-)

More information about the hotspot-dev mailing list