< prev index next >

test/jdk/jdk/jfr/jcmd/TestJcmdStartWithSettings.java

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


  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  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.jcmd;
  27 
  28 import java.io.File;
  29 
  30 import jdk.jfr.consumer.RecordedEvent;
  31 import jdk.jfr.consumer.RecordedThread;
  32 import jdk.jfr.consumer.RecordingFile;
  33 import jdk.test.lib.Asserts;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 
  38 /*
  39  * @test
  40  * @summary The test verifies that recording can be started with setting file(s)
  41  * @key jfr

  42  * @library /test/lib /test/jdk
  43  * @run main/othervm jdk.jfr.jcmd.TestJcmdStartWithSettings
  44  */
  45 public class TestJcmdStartWithSettings {
  46 
  47     private static final String DIR = System.getProperty("test.src", ".");
  48     private static final File SETTINGS = new File(DIR, "jcmd-testsettings.jfc");
  49     private static final File SETTINGS2 = new File(DIR, "jcmd-testsettings.2.jfc");
  50 
  51     public static void main(String[] args) throws Exception {
  52         testSingleSettingFile();
  53         testManySettingFiles();
  54         testPresetSettings();
  55         testNonExistingSettingFile();
  56     }
  57 
  58     private static void testSingleSettingFile() throws Exception {
  59         String name = "testSingleSettingFile";
  60         File recording = new File(name + ".jfr");
  61 




  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  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.jcmd;
  27 
  28 import java.io.File;
  29 
  30 import jdk.jfr.consumer.RecordedEvent;
  31 import jdk.jfr.consumer.RecordedThread;
  32 import jdk.jfr.consumer.RecordingFile;
  33 import jdk.test.lib.Asserts;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 
  38 /**
  39  * @test
  40  * @summary The test verifies that recording can be started with setting file(s)
  41  * @key jfr
  42  * @requires vm.hasJFR
  43  * @library /test/lib /test/jdk
  44  * @run main/othervm jdk.jfr.jcmd.TestJcmdStartWithSettings
  45  */
  46 public class TestJcmdStartWithSettings {
  47 
  48     private static final String DIR = System.getProperty("test.src", ".");
  49     private static final File SETTINGS = new File(DIR, "jcmd-testsettings.jfc");
  50     private static final File SETTINGS2 = new File(DIR, "jcmd-testsettings.2.jfc");
  51 
  52     public static void main(String[] args) throws Exception {
  53         testSingleSettingFile();
  54         testManySettingFiles();
  55         testPresetSettings();
  56         testNonExistingSettingFile();
  57     }
  58 
  59     private static void testSingleSettingFile() throws Exception {
  60         String name = "testSingleSettingFile";
  61         File recording = new File(name + ".jfr");
  62 


< prev index next >