< prev index next >

test/jdk/jdk/jfr/jcmd/TestJcmdDumpGeneratedFilename.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 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 import java.util.Iterator;
  32 
  33 import jdk.jfr.Configuration;
  34 import jdk.jfr.Recording;
  35 import jdk.test.lib.jfr.FileHelper;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 
  38 /*
  39  * @test
  40  * @summary The test verifies JFR.dump command
  41  * @key jfr

  42  * @library /test/lib /test/jdk
  43  * @run main/othervm jdk.jfr.jcmd.TestJcmdDumpGeneratedFilename
  44  */
  45 public class TestJcmdDumpGeneratedFilename {
  46 
  47     public static void main(String[] args) throws Exception {
  48         // Increase the id for a recording
  49         for (int i = 0; i < 300; i++) {
  50             new Recording();
  51         }
  52         try (Recording r = new Recording(Configuration.getConfiguration("default"))) {
  53             r.start();
  54             r.stop();
  55             testDumpFilename();
  56             testDumpFilename(r);
  57             testDumpDiectory();
  58             testDumpDiectory(r);
  59         }
  60     }
  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 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 import java.util.Iterator;
  32 
  33 import jdk.jfr.Configuration;
  34 import jdk.jfr.Recording;
  35 import jdk.test.lib.jfr.FileHelper;
  36 import jdk.test.lib.process.OutputAnalyzer;
  37 
  38 /**
  39  * @test
  40  * @summary The test verifies JFR.dump command
  41  * @key jfr
  42  * @requires vm.hasJFR
  43  * @library /test/lib /test/jdk
  44  * @run main/othervm jdk.jfr.jcmd.TestJcmdDumpGeneratedFilename
  45  */
  46 public class TestJcmdDumpGeneratedFilename {
  47 
  48     public static void main(String[] args) throws Exception {
  49         // Increase the id for a recording
  50         for (int i = 0; i < 300; i++) {
  51             new Recording();
  52         }
  53         try (Recording r = new Recording(Configuration.getConfiguration("default"))) {
  54             r.start();
  55             r.stop();
  56             testDumpFilename();
  57             testDumpFilename(r);
  58             testDumpDiectory();
  59             testDumpDiectory(r);
  60         }
  61     }
  62 


< prev index next >