< 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,82 ----
// 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";
! //For filtering out -XX:+ExplicitGCInvokesConcurrent vm option
! String[] filterExplicitGCOptions = new String[]{"-XX:\\+ExplicitGCInvokesConcurrent"};
! RunUtil.runTestClearGcOpts(filterExplicitGCOptions, main, nmFlag, lpFlag, "-XX:+UseSerialGC");
! RunUtil.runTestClearGcOpts(filterExplicitGCOptions, main, nmFlag, lpFlag, "-XX:+UseParallelGC");
! RunUtil.runTestClearGcOpts(filterExplicitGCOptions, main, nmFlag, lpFlag, "-XX:+UseG1GC", g1Flag);
! RunUtil.runTestClearGcOpts(filterExplicitGCOptions, main, nmFlag, lpFlag, "-XX:+UseConcMarkSweepGC");
}
private static volatile boolean listenerInvoked = false;
static class SensorListener implements NotificationListener {
@Override
< prev index next >