< prev index next >

test/jdk/jdk/jfr/jcmd/TestJcmdStartWithOptions.java

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


  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  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.FlightRecorder;
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.RecordingState;
  33 import jdk.test.lib.process.OutputAnalyzer;
  34 
  35 /*
  36  * @test
  37  * @summary The test verifies that recording can be started with options delay|duration|maxage|maxsize
  38  * @key jfr

  39  * @library /test/lib /test/jdk
  40  * @run main/othervm -XX:+FlightRecorder -XX:FlightRecorderOptions=maxchunksize=2097152 jdk.jfr.jcmd.TestJcmdStartWithOptions
  41  */
  42 public class TestJcmdStartWithOptions {
  43 
  44     private static final String DIR = System.getProperty("test.src", ".");
  45     private static final File SETTINGS = new File(DIR, "jcmd-testsettings3.jfc");
  46 
  47     public static void main(String[] args) throws Exception {
  48         testRecordingNotStartedTooEarly();
  49         testDelayLessThan1s();
  50         testDuration();
  51         testDurationLessThan1s();
  52         testMaxAge();
  53         testMaxSize();
  54     }
  55 
  56     static void testRecordingNotStartedTooEarly() throws Exception {
  57         String name = "testRecordingNotStartedTooEarly";
  58         long delay = 2 * 1000;




  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  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.FlightRecorder;
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.RecordingState;
  33 import jdk.test.lib.process.OutputAnalyzer;
  34 
  35 /**
  36  * @test
  37  * @summary The test verifies that recording can be started with options delay|duration|maxage|maxsize
  38  * @key jfr
  39  * @requires vm.hasJFR
  40  * @library /test/lib /test/jdk
  41  * @run main/othervm -XX:+FlightRecorder -XX:FlightRecorderOptions=maxchunksize=2097152 jdk.jfr.jcmd.TestJcmdStartWithOptions
  42  */
  43 public class TestJcmdStartWithOptions {
  44 
  45     private static final String DIR = System.getProperty("test.src", ".");
  46     private static final File SETTINGS = new File(DIR, "jcmd-testsettings3.jfc");
  47 
  48     public static void main(String[] args) throws Exception {
  49         testRecordingNotStartedTooEarly();
  50         testDelayLessThan1s();
  51         testDuration();
  52         testDurationLessThan1s();
  53         testMaxAge();
  54         testMaxSize();
  55     }
  56 
  57     static void testRecordingNotStartedTooEarly() throws Exception {
  58         String name = "testRecordingNotStartedTooEarly";
  59         long delay = 2 * 1000;


< prev index next >