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

get rid of multiple implementations of MemoryUsagePrinter in gc tests

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9, 11
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      The following tests:
      hotspot/gc/g1/TestHumongousShrinkHeap.java
      hotspot/gc/g1/TestShrinkDefragmentedHeap.java
      hotspot/gc/parallel/TestDynShrinkHeap.java

      have own implementation of printing MemoryUsage functionality.
      MemoryUsagePrinter class is replicated several times.

      It could be moved to the the library code (gc.testlibrary.Helpers)
      Suggested API:

         public static String formatNumber(Number n);
         public static void printMemoryUsage(String label, MemoryUsage mu);

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dfazunen Dmitry Fazunenko (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: