< prev index next >

test/hotspot/jtreg/gc/TestSystemGC.java

Print this page




   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 package gc;
  25 
  26 /*
  27  * @test TestSystemGC
  28  * @key gc
  29  * @requires vm.gc=="null"
  30  * @summary Runs System.gc() with different flags.
  31  * @run main/othervm gc.TestSystemGC
  32  * @run main/othervm -XX:+UseSerialGC gc.TestSystemGC
  33  * @run main/othervm -XX:+UseParallelGC gc.TestSystemGC
  34  * @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC gc.TestSystemGC
  35  * @run main/othervm -XX:+UseG1GC gc.TestSystemGC
  36  * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  37  * @run main/othervm -XX:+UseLargePages gc.TestSystemGC
  38  * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace gc.TestSystemGC
  39  */
  40 
  41 /*
  42  * @test TestSystemGCCMS
  43  * @key gc
  44  * @comment Graal does not support CMS
  45  * @requires vm.gc=="null" & !vm.graal.enabled
  46  * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestSystemGC
  47  * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  48  */
  49 
  50 /*
  51  * @test TestSystemGCShenandoah
  52  * @key gc
  53  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  54  * @summary Runs System.gc() with different flags.
  55  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.TestSystemGC
  56  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  57  */
  58 public class TestSystemGC {
  59   public static void main(String args[]) throws Exception {
  60     System.gc();
  61   }
  62 }


   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 package gc;
  25 
  26 /*
  27  * @test TestSystemGC
  28  * @key gc
  29  * @requires vm.gc.Serial & vm.gc.Parallel & vm.gc.G1
  30  * @summary Runs System.gc() with different flags.
  31  * @run main/othervm gc.TestSystemGC
  32  * @run main/othervm -XX:+UseSerialGC gc.TestSystemGC
  33  * @run main/othervm -XX:+UseParallelGC gc.TestSystemGC
  34  * @run main/othervm -XX:+UseParallelGC -XX:-UseParallelOldGC gc.TestSystemGC
  35  * @run main/othervm -XX:+UseG1GC gc.TestSystemGC
  36  * @run main/othervm -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  37  * @run main/othervm -XX:+UseLargePages gc.TestSystemGC
  38  * @run main/othervm -XX:+UseLargePages -XX:+UseLargePagesInMetaspace gc.TestSystemGC
  39  */
  40 
  41 /*
  42  * @test TestSystemGCCMS
  43  * @key gc
  44  * @comment Graal does not support CMS
  45  * @requires vm.gc.ConcMarkSweep & !vm.graal.enabled
  46  * @run main/othervm -XX:+UseConcMarkSweepGC gc.TestSystemGC
  47  * @run main/othervm -XX:+UseConcMarkSweepGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  48  */
  49 
  50 /*
  51  * @test TestSystemGCShenandoah
  52  * @key gc
  53  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  54  * @summary Runs System.gc() with different flags.
  55  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC gc.TestSystemGC
  56  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+ExplicitGCInvokesConcurrent gc.TestSystemGC
  57  */
  58 public class TestSystemGC {
  59   public static void main(String args[]) throws Exception {
  60     System.gc();
  61   }
  62 }
< prev index next >