test/hotspot/jtreg/gc/arguments/TestMaxMinHeapFreeRatioFlags.java
changeset 47885 5caa1d5f74c1
parent 47216 71c04702a3d5
child 50525 767cdb97f103
equal deleted inserted replaced
47884:3cfab71d6c81 47885:5caa1d5f74c1
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   154 
   154 
   155         public static void main(String args[]) throws Exception {
   155         public static void main(String args[]) throws Exception {
   156             if (args.length != 3) {
   156             if (args.length != 3) {
   157                 throw new IllegalArgumentException("Expected 3 args: <minRatio> <maxRatio> <shrinkHeapInSteps>");
   157                 throw new IllegalArgumentException("Expected 3 args: <minRatio> <maxRatio> <shrinkHeapInSteps>");
   158             }
   158             }
   159             if (GCTypes.OldGCType.getOldGCType() == GCTypes.OldGCType.PSOld) {
   159             if (GCTypes.OldGCType.getOldGCType() == GCTypes.OldGCType.PSOld ||
   160                 System.out.println("Test is not applicable to parallel GC");
   160                 GCTypes.OldGCType.getOldGCType() == GCTypes.OldGCType.G1) {
       
   161                 System.out.println("Test is not applicable to parallel full GCs");
   161                 return;
   162                 return;
   162             }
   163             }
   163 
   164 
   164             double minRatio = Integer.valueOf(args[0]) / 100.0;
   165             double minRatio = Integer.valueOf(args[0]) / 100.0;
   165             double maxRatio = Integer.valueOf(args[1]) / 100.0;
   166             double maxRatio = Integer.valueOf(args[1]) / 100.0;