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 SpaceUtilizationCheck
26 * @summary Check if the space utilization for shared spaces is adequate
27 * @library /testlibrary
28 * @modules java.base/sun.misc
29 * java.management
30 * @run main SpaceUtilizationCheck
31 */
32
33 import com.oracle.java.testlibrary.*;
34
35 import java.util.regex.Pattern;
36 import java.util.regex.Matcher;
37 import java.util.ArrayList;
38 import java.lang.Integer;
39
40 public class SpaceUtilizationCheck {
41 // Minimum allowed utilization value (percent)
42 // The goal is to have this number to be 50% for RO and RW regions
43 // Once that feature is implemented, increase the MIN_UTILIZATION to 50
44 private static final int MIN_UTILIZATION = 30;
45
46 // Only RO and RW regions are considered for this check, since they
47 // currently account for the bulk of the shared space
48 private static final int NUMBER_OF_CHECKED_SHARED_REGIONS = 2;
49
50 public static void main(String[] args) throws Exception {
51 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
52 "-XX:+UnlockDiagnosticVMOptions",
53 "-XX:SharedArchiveFile=./SpaceUtilizationCheck.jsa",
|
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 SpaceUtilizationCheck
26 * @summary Check if the space utilization for shared spaces is adequate
27 * @library /testlibrary
28 * @modules java.base/sun.misc
29 * java.management
30 * @run main SpaceUtilizationCheck
31 */
32
33 import jdk.test.lib.*;
34
35 import java.util.regex.Pattern;
36 import java.util.regex.Matcher;
37 import java.util.ArrayList;
38 import java.lang.Integer;
39
40 public class SpaceUtilizationCheck {
41 // Minimum allowed utilization value (percent)
42 // The goal is to have this number to be 50% for RO and RW regions
43 // Once that feature is implemented, increase the MIN_UTILIZATION to 50
44 private static final int MIN_UTILIZATION = 30;
45
46 // Only RO and RW regions are considered for this check, since they
47 // currently account for the bulk of the shared space
48 private static final int NUMBER_OF_CHECKED_SHARED_REGIONS = 2;
49
50 public static void main(String[] args) throws Exception {
51 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
52 "-XX:+UnlockDiagnosticVMOptions",
53 "-XX:SharedArchiveFile=./SpaceUtilizationCheck.jsa",
|