Patch: Add simple systemtap tracing support

Mark Wielaard mjw at
Fri Mar 27 05:31:55 PDT 2009


This patch adds simple systemtap tracing support. Stan Cox made it so
that systemtap can reuse dtrace dynamic static markers almost without
any changes to the sources. This patch simply cleans up the parts of the
code that relied on dtrace markers being something solaris specific and
introduces the DTRACE_ENABLED flag for gnu/linux builds.

2009-03-27  Mark Wielaard  <mjw at>

	* patches/icedtea-systemtap.patch: New patch.
	* Add AC_ARG_ENABLE systemtap and AC_CHECK_HEADER
	for sys/sdt.h when --enable-systemtap given.
	* Add patches/icedtea-systemtap.patch to

This requires a pretty recent systemtap build, so it is disabled by
default. Enable it with configure --enable-systemtap.

There is still some work to do to enable more interesting probes. For
now the jni provider and the compiled method load/unload probes are
disabled. They need some tweaks to get compiled with the gcc
preprocessor. Also the nmethod support for generated code dtrace probes
isn't there yet. This needs some extra magic and currently relies on
dtrace.h which we don't provide with systemtap.

But you can already probe for the other things from the hotspot and
hsprivate collections like class loading/unloading, vm init/begin/end
and shutdown, thread start/stop, gc and mempool events, monitors events
(when running with -XX:+ExtendedDTraceProbes). See the hotspot and
hsprivate .d files under hotspot/src/os/solaris/dtrace for more details.

The jhelper.d (stack traces) utilities aren't support yet.

When all of this is cleaned up, I will also submit upstream.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemtap.patch
Type: text/x-patch
Size: 8122 bytes
Desc: not available
Url : 

More information about the distro-pkg-dev mailing list