< prev index next >
test/java/lang/management/MemoryMXBean/LowMemoryTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 67,80 ****
// make sure we don't use them for this test.
final String lpFlag = "-XX:-UseLargePages";
// Prevent G1 from selecting a large heap region size,
// since that would change the young gen size.
final String g1Flag = "-XX:G1HeapRegionSize=1m";
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseSerialGC");
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseParallelGC");
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag);
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC");
}
private static volatile boolean listenerInvoked = false;
static class SensorListener implements NotificationListener {
@Override
--- 67,83 ----
// make sure we don't use them for this test.
final String lpFlag = "-XX:-UseLargePages";
// Prevent G1 from selecting a large heap region size,
// since that would change the young gen size.
final String g1Flag = "-XX:G1HeapRegionSize=1m";
! // Start test execution with -XX:-ExplicitGCInvokesConcurrent
! // Test is not targeted to work with -XX:+ExplicitGCInvokesConcurrent
! final String noExplictGC = "-XX:-ExplicitGCInvokesConcurrent";
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseSerialGC", noExplictGC);
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseParallelGC", noExplictGC);
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag, noExplictGC);
! RunUtil.runTestClearGcOpts(main, nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC", noExplictGC);
}
private static volatile boolean listenerInvoked = false;
static class SensorListener implements NotificationListener {
@Override
< prev index next >