< prev index next >

test/gc/arguments/TestObjectTenuringFlags.java

Print this page




  11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 * version 2 for more details (a copy is included in the LICENSE file that
  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 TestObjectTenuringFlags
  26  * @key gc
  27  * @bug 6521376
  28  * @requires vm.gc.Parallel
  29  * @summary Tests argument processing for NeverTenure, AlwaysTenure,
  30  * and MaxTenuringThreshold
  31  * @library /testlibrary
  32  * @modules java.base/jdk.internal.misc
  33  *          java.management
  34  * @build TestObjectTenuringFlags FlagsValue
  35  * @run main/othervm TestObjectTenuringFlags
  36  */
  37 
  38 import jdk.test.lib.*;

  39 
  40 import java.util.*;
  41 
  42 public class TestObjectTenuringFlags {
  43   public static void main(String args[]) throws Exception {
  44     // default case
  45     runTenuringFlagsConsistencyTest(
  46         new String[]{},
  47         false /* shouldFail */,
  48         new ExpectedTenuringFlags(false /* alwaysTenure */, false /* neverTenure */, 7, 15));
  49 
  50     // valid cases
  51     runTenuringFlagsConsistencyTest(
  52         new String[]{"-XX:+NeverTenure"},
  53         false /* shouldFail */,
  54         new ExpectedTenuringFlags(false /* alwaysTenure */, true /* neverTenure */, 7, 16));
  55 
  56     runTenuringFlagsConsistencyTest(
  57         new String[]{"-XX:+AlwaysTenure"},
  58         false /* shouldFail */,




  11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12 * version 2 for more details (a copy is included in the LICENSE file that
  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 TestObjectTenuringFlags
  26  * @key gc
  27  * @bug 6521376
  28  * @requires vm.gc.Parallel
  29  * @summary Tests argument processing for NeverTenure, AlwaysTenure,
  30  * and MaxTenuringThreshold
  31  * @library /test/lib
  32  * @modules java.base/jdk.internal.misc
  33  *          java.management

  34  * @run main/othervm TestObjectTenuringFlags
  35  */
  36 
  37 import jdk.test.lib.process.OutputAnalyzer;
  38 import jdk.test.lib.process.ProcessTools;
  39 
  40 import java.util.*;
  41 
  42 public class TestObjectTenuringFlags {
  43   public static void main(String args[]) throws Exception {
  44     // default case
  45     runTenuringFlagsConsistencyTest(
  46         new String[]{},
  47         false /* shouldFail */,
  48         new ExpectedTenuringFlags(false /* alwaysTenure */, false /* neverTenure */, 7, 15));
  49 
  50     // valid cases
  51     runTenuringFlagsConsistencyTest(
  52         new String[]{"-XX:+NeverTenure"},
  53         false /* shouldFail */,
  54         new ExpectedTenuringFlags(false /* alwaysTenure */, true /* neverTenure */, 7, 16));
  55 
  56     runTenuringFlagsConsistencyTest(
  57         new String[]{"-XX:+AlwaysTenure"},
  58         false /* shouldFail */,


< prev index next >