< prev index next >

test/gc/stress/gcold/TestGCOld.java

Print this page
rev 12803 : 8177967: Move TestGCOld to subdirectory


   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 TestGCOld
  26  * @key gc
  27  * @key stress
  28  * @requires vm.gc=="null"
  29  * @summary Stress the GC by trying to make old objects more likely to be garbage than young objects.
  30  * @run main/othervm -Xmx384M -XX:+UseSerialGC TestGCOld 50 1 20 10 10000
  31  * @run main/othervm -Xmx384M -XX:+UseParallelGC TestGCOld 50 1 20 10 10000
  32  * @run main/othervm -Xmx384M -XX:+UseParallelGC -XX:-UseParallelOldGC TestGCOld 50 1 20 10 10000
  33  * @run main/othervm -Xmx384M -XX:+UseConcMarkSweepGC TestGCOld 50 1 20 10 10000
  34  * @run main/othervm -Xmx384M -XX:+UseG1GC TestGCOld 50 1 20 10 10000
  35  * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads -Xlog:gc,gc+task=trace TestGCOld 50 5 20 1 5000
  36  * @run main/othervm -Xms64m -Xmx128m -XX:+UseG1GC -XX:+UseDynamicNumberOfGCThreads  -XX:+UnlockDiagnosticVMOptions -XX:+InjectGCWorkerCreationFailure -Xlog:gc,gc+task=trace TestGCOld 50 5 20 1 5000
  37  */
  38 
  39 import java.text.*;
  40 import java.util.Random;
  41 
  42 class TreeNode {
  43     public TreeNode left, right;
  44     public int val;                // will always be the height of the tree
  45 }
  46 
  47 
  48 /* Args:
  49    live-data-size: in megabytes (approximate, will be rounded down).
  50    work: units of mutator non-allocation work per byte allocated,
  51      (in unspecified units.  This will affect the promotion rate
  52       printed at the end of the run: more mutator work per step implies
  53       fewer steps per second implies fewer bytes promoted per second.)
  54    short/long ratio: ratio of short-lived bytes allocated to long-lived
  55       bytes allocated.
  56    pointer mutation rate: number of pointer mutations per step.
  57    steps: number of steps to do.
  58 */




   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  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 import java.text.*;
  25 import java.util.Random;
  26 
  27 class TreeNode {
  28     public TreeNode left, right;
  29     public int val;                // will always be the height of the tree
  30 }
  31 
  32 
  33 /* Args:
  34    live-data-size: in megabytes (approximate, will be rounded down).
  35    work: units of mutator non-allocation work per byte allocated,
  36      (in unspecified units.  This will affect the promotion rate
  37       printed at the end of the run: more mutator work per step implies
  38       fewer steps per second implies fewer bytes promoted per second.)
  39    short/long ratio: ratio of short-lived bytes allocated to long-lived
  40       bytes allocated.
  41    pointer mutation rate: number of pointer mutations per step.
  42    steps: number of steps to do.
  43 */


< prev index next >