The DTrace static probe implementation in Hotspot was written with an earlier version of DTrace. With newer versions, DTrace can create a header file from the contents of the .d file that describes the probes. This newer version (called USDT2) has been used on OS X. Because we have had both versions active, the code has ended up looking ugly because of all the extra macros.
This is a first step in cleaning that up by moving the solaris implementation to use USDT2. The remaining step before USDT1 can be removed is to change the Linux system tap implementation to also use USDT2. What I have changed is: - Update the solaris dtrace.make to generate the header files. I have used the same code as on bsd. - While I was there, I removed a lot of commented out code from the bsd dtrace.make file. - Updated the hotspot.d files on bsd and solaris so that they have the same contents. - Fixed some compilation errors in compileBroker.cpp with const char*. - May of the USDT2 macro invocations had an extra line break in them. This both looked ugly and confused the solaris compiler, so I removed them. This lead to a _lot_ of changes in jni.cpp - enough changes so that webrev couldn’t handle it, which is why some of the webrev views are broken for this file. - Testing: I have run the vm.dtrace.testlist on both Solaris and OS X. webrev: http://cr.openjdk.java.net/~sla/8030812/webrev.00/ bug: https://bugs.openjdk.java.net/browse/JDK-8030812 Thanks, /Staffan