10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test TestPLABResize 26 * @bug 8141278 8141141 27 * @summary Test for PLAB resizing 28 * @requires vm.gc.G1 29 * @requires !vm.flightRecorder 30 * @library /testlibrary /test/lib / 31 * @modules java.base/jdk.internal.misc 32 * @modules java.management 33 * @build ClassFileInstaller 34 * sun.hotspot.WhiteBox 35 * gc.g1.plab.lib.LogParser 36 * gc.g1.plab.lib.MemoryConsumer 37 * gc.g1.plab.lib.PLABUtils 38 * gc.g1.plab.lib.AppPLABResize 39 * @run main ClassFileInstaller sun.hotspot.WhiteBox 40 * sun.hotspot.WhiteBox$WhiteBoxPermission 41 * @run main gc.g1.plab.TestPLABResize 42 */ 43 package gc.g1.plab; 44 45 import java.util.Arrays; 46 import java.util.List; 47 import java.util.stream.Collectors; 48 import java.io.PrintStream; 49 50 import gc.g1.plab.lib.LogParser; 51 import gc.g1.plab.lib.PLABUtils; 52 import gc.g1.plab.lib.AppPLABResize; 53 import gc.g1.plab.lib.PlabReport; 54 55 import jdk.test.lib.OutputAnalyzer; 56 import jdk.test.lib.ProcessTools; 57 58 /** 59 * Test for PLAB resizing. 60 */ 61 public class TestPLABResize { 62 63 private static final int OBJECT_SIZE_SMALL = 10; 64 private static final int OBJECT_SIZE_MEDIUM = 70; 65 private static final int OBJECT_SIZE_HIGH = 150; 66 private static final int GC_NUM_SMALL = 1; 67 private static final int GC_NUM_MEDIUM = 3; 68 private static final int GC_NUM_HIGH = 7; 69 private static final int WASTE_PCT_SMALL = 10; 70 private static final int WASTE_PCT_MEDIUM = 20; 71 private static final int WASTE_PCT_HIGH = 30; 72 73 private static final int ITERATIONS_SMALL = 3; 74 private static final int ITERATIONS_MEDIUM = 5; 75 private static final int ITERATIONS_HIGH = 8; 76 | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /* 25 * @test TestPLABResize 26 * @bug 8141278 8141141 27 * @summary Test for PLAB resizing 28 * @requires vm.gc.G1 29 * @requires !vm.flightRecorder 30 * @library /test/lib / 31 * @modules java.base/jdk.internal.misc 32 * @modules java.management 33 * @build sun.hotspot.WhiteBox 34 * @run main ClassFileInstaller sun.hotspot.WhiteBox 35 * sun.hotspot.WhiteBox$WhiteBoxPermission 36 * @run main gc.g1.plab.TestPLABResize 37 */ 38 package gc.g1.plab; 39 40 import java.util.Arrays; 41 import java.util.List; 42 import java.util.stream.Collectors; 43 import java.io.PrintStream; 44 45 import gc.g1.plab.lib.LogParser; 46 import gc.g1.plab.lib.PLABUtils; 47 import gc.g1.plab.lib.AppPLABResize; 48 import gc.g1.plab.lib.PlabReport; 49 50 import jdk.test.lib.process.OutputAnalyzer; 51 import jdk.test.lib.process.ProcessTools; 52 53 /** 54 * Test for PLAB resizing. 55 */ 56 public class TestPLABResize { 57 58 private static final int OBJECT_SIZE_SMALL = 10; 59 private static final int OBJECT_SIZE_MEDIUM = 70; 60 private static final int OBJECT_SIZE_HIGH = 150; 61 private static final int GC_NUM_SMALL = 1; 62 private static final int GC_NUM_MEDIUM = 3; 63 private static final int GC_NUM_HIGH = 7; 64 private static final int WASTE_PCT_SMALL = 10; 65 private static final int WASTE_PCT_MEDIUM = 20; 66 private static final int WASTE_PCT_HIGH = 30; 67 68 private static final int ITERATIONS_SMALL = 3; 69 private static final int ITERATIONS_MEDIUM = 5; 70 private static final int ITERATIONS_HIGH = 8; 71 |