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

Daniel D. Daugherty daniel.daugherty at oracle.com
Mon May 14 06:41:50 PDT 2012


On 5/14/12 2:06 AM, Mark Wielaard wrote:
> On Thu, 2012-05-10 at 09:52 -0600, Daniel D. Daugherty wrote:
>> Adding serviceability-dev at openjdk.java.net to this e-mail thread.
> Thanks. Please let me know if there is anything I can do to help
> integration of these patches, or if there are other places/people I need
> to add to the CC for review.

No problem. I was just making sure your e-mails got to the right aliases.
As I no longer work on the Serviceability team, I'll leave it to them to
address your e-mails.

Dan


>> On 5/10/12 7:49 AM, Mark Wielaard wrote:
>>> Hi,
>>>
>>> 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
>>> 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 (HS_DTRACE_WORKAROUND_TAIL_CALL_BUG
>>> 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.
>>>
>>> Cheers,
>>>
>>> Mark
>>>
>>> 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 serviceability-dev mailing list