visualvm
visualvm copied to clipboard
Monitor total allocated bytes on the Java heap by the JVM
JDK 21 added 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. It would be useful to use this new JXM API to monitor allocated bytes by whole JVM.
Corresponding JDK issue: JDK-8304074.