Replace Graal's use of the management API

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P3
    • 11
    • Affects Version/s: 10
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: