< prev index next >

test/jdk/jdk/jfr/event/gc/detailed/TestG1ConcurrentModeFailureEvent.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.gc.detailed;
  27 
  28 import java.io.IOException;
  29 import java.io.File;
  30 import java.nio.charset.Charset;
  31 import java.nio.file.Files;
  32 import java.nio.file.Path;
  33 import java.nio.file.Paths;
  34 import java.util.Optional;
  35 
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.jfr.consumer.RecordingFile;
  38 import jdk.test.lib.Asserts;
  39 import jdk.test.lib.jfr.EventNames;
  40 
  41 /*
  42  * @test
  43  * @key jfr

  44  *
  45  * @requires vm.gc == "G1" | vm.gc == null
  46  * @library /test/lib /test/jdk
  47  * @run main jdk.jfr.event.gc.detailed.TestG1ConcurrentModeFailureEvent
  48  */
  49 
  50 public class TestG1ConcurrentModeFailureEvent {
  51 
  52     private final static String EVENT_NAME = EventNames.ConcurrentModeFailure;
  53     private final static String EVENT_SETTINGS_FILE = System.getProperty("test.src", ".") + File.separator + "concurrentmodefailure-testsettings.jfc";
  54     private final static String JFR_FILE = "TestG1ConcurrentModeFailureEvent.jfr";
  55     private final static int BYTES_TO_ALLOCATE = 1024 * 512;
  56 
  57     public static void main(String[] args) throws Exception {
  58         String[] vmFlags = {"-Xmx512m", "-Xms512m", "-XX:MaxTenuringThreshold=0", "-Xlog:gc*=debug:testG1GC.log",
  59             "-XX:+UseG1GC", "-XX:+UnlockExperimentalVMOptions", "-XX:-UseFastUnorderedTimeStamps"};
  60 
  61         if (!ExecuteOOMApp.execute(EVENT_SETTINGS_FILE, JFR_FILE, vmFlags, BYTES_TO_ALLOCATE)) {
  62             System.out.println("OOM happened in the other thread(not test thread). Skip test.");
  63             // Skip test, process terminates due to the OOME error in the different thread




  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package jdk.jfr.event.gc.detailed;
  27 
  28 import java.io.IOException;
  29 import java.io.File;
  30 import java.nio.charset.Charset;
  31 import java.nio.file.Files;
  32 import java.nio.file.Path;
  33 import java.nio.file.Paths;
  34 import java.util.Optional;
  35 
  36 import jdk.jfr.consumer.RecordedEvent;
  37 import jdk.jfr.consumer.RecordingFile;
  38 import jdk.test.lib.Asserts;
  39 import jdk.test.lib.jfr.EventNames;
  40 
  41 /**
  42  * @test
  43  * @key jfr
  44  * @requires vm.hasJFR
  45  *
  46  * @requires vm.gc == "G1" | vm.gc == null
  47  * @library /test/lib /test/jdk
  48  * @run main jdk.jfr.event.gc.detailed.TestG1ConcurrentModeFailureEvent
  49  */
  50 
  51 public class TestG1ConcurrentModeFailureEvent {
  52 
  53     private final static String EVENT_NAME = EventNames.ConcurrentModeFailure;
  54     private final static String EVENT_SETTINGS_FILE = System.getProperty("test.src", ".") + File.separator + "concurrentmodefailure-testsettings.jfc";
  55     private final static String JFR_FILE = "TestG1ConcurrentModeFailureEvent.jfr";
  56     private final static int BYTES_TO_ALLOCATE = 1024 * 512;
  57 
  58     public static void main(String[] args) throws Exception {
  59         String[] vmFlags = {"-Xmx512m", "-Xms512m", "-XX:MaxTenuringThreshold=0", "-Xlog:gc*=debug:testG1GC.log",
  60             "-XX:+UseG1GC", "-XX:+UnlockExperimentalVMOptions", "-XX:-UseFastUnorderedTimeStamps"};
  61 
  62         if (!ExecuteOOMApp.execute(EVENT_SETTINGS_FILE, JFR_FILE, vmFlags, BYTES_TO_ALLOCATE)) {
  63             System.out.println("OOM happened in the other thread(not test thread). Skip test.");
  64             // Skip test, process terminates due to the OOME error in the different thread


< prev index next >