提交 56fc22d6 编写于 作者: S sla

8015440: java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java fails with RuntimeException

Summary: Make sure serial gc compacts heap every time
Reviewed-by: mchung, brutisso, nloodin
上级 f42e9730
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
* questions. * questions.
*/ */
/*
* The -XX:MarkSweepAlwaysCompactCount=1 argument below makes sure serial gc
* compacts the heap at every full gc so that the usage is correctly updated.
*/
/* /*
* @test * @test
* @bug 4892507 * @bug 4892507
...@@ -28,7 +33,7 @@ ...@@ -28,7 +33,7 @@
* @author Mandy Chung * @author Mandy Chung
* *
* @build ResetPeakMemoryUsage MemoryUtil * @build ResetPeakMemoryUsage MemoryUtil
* @run main/othervm -XX:+UseSerialGC -Xmn8m ResetPeakMemoryUsage * @run main/othervm -XX:+UseSerialGC -XX:MarkSweepAlwaysCompactCount=1 -Xmn8m ResetPeakMemoryUsage
* @run main/othervm -XX:+UseConcMarkSweepGC -Xmn8m ResetPeakMemoryUsage * @run main/othervm -XX:+UseConcMarkSweepGC -Xmn8m ResetPeakMemoryUsage
* @run main/othervm -XX:+UseParallelGC -Xmn8m ResetPeakMemoryUsage * @run main/othervm -XX:+UseParallelGC -Xmn8m ResetPeakMemoryUsage
* @run main/othervm -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage * @run main/othervm -XX:+UseG1GC -Xmn8m -XX:G1HeapRegionSize=1m ResetPeakMemoryUsage
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册