Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8173263

Enable USDT probes in Oracle JDK in Linux

    XMLWordPrintable

Details

    • x86_64
    • linux

    Description

      A DESCRIPTION OF THE REQUEST :
      USDT (user land statically defined tracing) and SDT Probes [0] provide system tracing tools stable locations to trace events of interest.

      At the time of the last major contribution [1] the build tool chain was below minimum versions.

      > * The functionality is only compiled into HotSpot if compiling on a system with sys/sdt.h and using GCC 4.5+
      > * That means that it will not be in the Oracle JDK short-term, because we (Oracle) are still compiling with GCC 4.3
      > * We (Oracle) will not be able to test this internally until we upgrade the tool chain (and potentially the distribution we use to compile)

      The build platforms [2] for Java 8 and 9 now support the minimum requirements to build USDT probes, apart from the probes header file would need to be available in addition. The new hotspot build system [3] in jdk9 has a new set of build scripts, but checks for the USDT header file as before.


      Would it be possible to review whether USDT probes can be enabled in some future release in the Oracle jdk on Linux?


      [0] http://dtrace.org/blogs/ahl/2006/05/08/user-land-tracing-gets-better-and-better/
          https://lwn.net/Articles/330402/
          
      [1] http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005739.html
          http://bugs.java.com/view_bug.do?bug_id=7170638
      [2] https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms
      [3] https://bugs.openjdk.java.net/browse/JDK-8152666


      JUSTIFICATION :
      USDT probes are enabled in some distributions of the JDK, on Solaris/MacOS/Linux, but to date not in the Oracle JDK on Linux.

      There are cases where the USDT probes provide tracing functionality not available elsewhere - for example the "monitor contended exit" event is not present in JVMTI [4] but does have an USDT probe. The USDT probe could be safely used for lock contention analysis [5].

      USDT probes can now be consumed by mainline kernel tools such as Linux perf events and eBPF [6] based tools.

      [4] https://bugs.openjdk.java.net/browse/JDK-8038441
          http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4986044
      [5] http://mail.openjdk.java.net/pipermail/hotspot-dev/2016-November/025142.html
      [6] http://www.slideshare.net/AlexeiStarovoitov/bpf-inkernel-virtual-machine
          https://lwn.net/Articles/603983/

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      USDT probes are present in the Oracle Linux jdk
      ACTUAL -
      USDT probes are not present Oracle jdk on Linux

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: