[PATCH 0 of 4] Add support for dtrace compatible sdt probes on GNU/Linux (original) (raw)

David Holmes david.holmes at oracle.com
Sat Jul 21 00:48:21 PDT 2012


I'd love to see webrevs for these patches. It's just too hard to evaluate a patch directly.

Thanks, David

On 21/07/2012 12:34 AM, Mark Wielaard wrote:

Hi,

This is a rebased version of the original patch set from last May against current hsx/hotspot-main. This version contains an extra patch with a simple testcase that makes sure that on GNU/Linux systems build with ENABLEDTRACE the SDT probes are actually there. They don't have to be applied all at once. Just apply those in the serie you feel are good to go. The later patches do depend on the earlier ones. But I rather see only the first applied and get feedback on why the later ones aren't good enough yet, than not get anything applied. Please let me know if there is anything else I can do to get these applied. The first patch is just a consistency cleanup patch. The JNI Set and SetStatic Field methods used HSDTRACEPROBECDECLN and HSDTRACEPROBEN directly instead of just using DTRACEPROBE[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 patch). 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 whether USDT1 is used with SOLARIS (HSDTRACEWORKAROUNDTAILCALLBUG is only needed there) and defines HSDTRACEPROBE[N] for the LINUX case. The third 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. The last patch introduces a small jtreg based testcase that checks whether this is a GNU/Linux build with ENABLEDTRACE and in that case makes sure the SDT probes are actually there in libjvm.so. 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 +- test/serviceability/SDTProbesGNULinuxTest.sh | 68 ++++++++++++++++++++++++++++ 5 files changed, 145 insertions(+), 10 deletions(-) Patches in separate emails. Thanks, Mark



More information about the hotspot-dev mailing list