-XX:[+|-]HeapManagementMXBeanCompatibility

The MXBean interface now reports more detailed information about memory pools and garbage collectors for a garbage collection policy. In addition, the names of memory pools and garbage collectors are changed to match the naming convention that is used for verbose garbage collection logging. This option provides compatibility with earlier versions of the VM.

Syntax

    -XX:[+|-]HeapManagementMXBeanCompatibility
Setting Effect Default
-XX:+HeapManagementMXBeanCompatibility Enable
-XX:-HeapManagementMXBeanCompatibility Disable yes

Setting -XX:+HeapManagementMXBeanCompatibility on the command line turns on compatibility with earlier versions of the VM. Information about memory pools and garbage collectors are reported in the older format.

When compatibility is turned off, the VM reports more detailed information and matches the naming of memory pools and garbage collectors to the naming convention that is used for verbose garbage collection logging.

Explanation

The additional information that is available from the MXBean interface for later versions is shown in the following table:

Garbage collection policy MemoryPool names GarbageCollector names
gencon nursery-allocate, nursery-survivor, tenured-LOA, tenured-SOA, tenured scavenge, global
optthruput or optavgpause tenured-LOA, tenured-SOA, tenured global
balanced balanced-reserved, balanced-eden, balanced-survivor, balanced-old partial gc, global garbage collect
metronome JavaHeap global

The MemoryPoolMXBean API reports values for 4 detailed memory pools instead of a single value for the overall Java™ heap. In some cases the total sum of the 4 pools is more than the maximum heap size. This irregularity can be caused if data for each pool is collected between garbage collection cycles, where objects have been moved or reclaimed. If you want to collect memory usage data that is synchronized across the memory pools, use the GarbageCollectionNotificationInfo or GarbageCollectorMXBean.getLastGcInfo extensions.

Earlier releases included only the following names:

  • MemoryPool pool name: Java heap
  • GarbageCollector name: Copy and MarkSweepCompact.

See also

For more information about IBM® MXBeans, see the com.ibm.lang.management API documentation.