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

[JMX] Add an approximation of total bytes allocated on the Java heap by the JVM

    XMLWordPrintable

Details

    Backports

      Description

        com.sun.management.ThreadMXBean supports per-thread cumulative allocated bytes queries via getThreadAllocatedBytes(long) and getThreadAllocatedBytes(long[]). There is, however, no way to get the same information for the entire JVM process. The value should include not only the amount allocated by live threads but also the amount allocated by terminated threads.

        Define a new com.sun.management.ThreadMXBean method getAllThreadAllocatedBytes() that, if both isAllocatedThreadMemorySupported() and isThreadAllocatedMemoryEnabled() are true, returns an approximation of the total number of bytes allocated in the Java heap by the JVM process.
         

        Attachments

          Issue Links

            Activity

              People

                phh Paul Hohensee
                phh Paul Hohensee
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: