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

G1: java/lang/management/MemoryMXBean/CollectionUsageThreshold.java failes with G1

XMLWordPrintable

    • gc
    • b14
    • generic
    • generic

        java/lang/management/MemoryMXBean/CollectionUsageThreshold.java fails consistently with G1.

        The test lowers the notification threshold for the G1 old gen memory pool and expects to get a notification after a full GC.

        The problem in G1 is that the decision to send the notification is done in TraceMemoryManagerStats::~TraceMemoryManagerStats(). This eventually does pool->get_memory_usage() to get the memory usage after a collection. The problem is that we update this information in G1MonitoringSupport::update_sizes() which is called in G1CollectedHeap::do_collection() _after_ the TraceMemoryManagerStats scope had been exited.

        Extending the scope to cover the call to G1MonitoringSupport::update_sizes() solves the issue.

              brutisso Bengt Rutisson (Inactive)
              brutisso Bengt Rutisson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: