equal
deleted
inserted
replaced
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; |