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

Improve performance of HeapDumpAllTest

XMLWordPrintable

    • b12

        HeapDumpAllTest.java tests the GC.heap_dump jcmd command with the "-all" flag. This triggers a heap dump without triggering a GC beforehand. This leads to the heap dump including dead objects and generally makes it larger. Since the parser used to parse the heap dump is not very fast, this makes the test run longer than the test without the "-all" flag.

        Since JDK-8267666 the test does not only create one heap dump but two. And since the second dump is created after the first one is parsed, it is much larger than the first one, containing the dead objects from the heap parsing. In my local system I get a 20 MB first dump and an 80 MB second dump. This makes the whole test runtime about 450 seconds.

        Since the test only checks if the "-all" flag does not lead to errors, it would be OK to trigger a GC before the dump is triggered. This brings the runtime of the test down to 35 seconds on my machine.
         

              rschmelter Ralf Schmelter
              rschmelter Ralf Schmelter
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: