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

Replace Graal's use of the management API

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 10
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:

      Description

      Graal uses the following management API and some can be replaced/workaround to eliminate those dependencies.

      1. RuntimeMXBean::getName to get the process ID

      This can be replaced with ProcessHandle::pid added in JDK 9.

      2. RuntimeMXBean::getInputArguments to get the VM arguments.

      There is an internal API that Graal can use (jdk.internal.misc.VM::getRuntimeArguments). It's not ideal but it could help eliminating this dependency.

      3. ThreadMXBean.getCurrentThreadCpuTime and com.sun.management.ThreadMXBean.getThreadAllocatedBytes

      There is no API in java.base to provide these metrics. Since Graal is tied with the VM, I won't object to add an internal API to expose this information.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dnsimon Douglas Simon
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: