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

Replace Graal's use of the management API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • 11
    • 10
    • hotspot

      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.

            dnsimon Douglas Simon
            mchung Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: