RFR: JDK-8272318: Improve performance of HeapDumpAllTest

Lin Zang lzang at openjdk.java.net
Fri Aug 13 03:15:21 UTC 2021


On Thu, 12 Aug 2021 06:10:45 GMT, Ralf Schmelter <rschmelter at openjdk.org> wrote:

> > Is there a reason you don't want this change to also apply to HeapDumpTest?
> 
> Since the GC.heap_dump already does a GC it is not really needed. Of course doing the gc in HeapDumpTest is a smaller change, so I'm open for that.

I prefer having System.gc() for "-all=true" only, IMO if put it into the HeapDumpTest, there can be 2 gc triggered, one from System.gc() and one from heapdump, which may be not necessary.  

One more question, is there necessary to have a test for using argument "-all=false" explicitly? Although it is used by default, maybe we need to test whether jcmd could accept the arguments normally.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5084


More information about the serviceability-dev mailing list