< prev index next >

test/jdk/jdk/jfr/api/recording/dump/TestDumpMultiple.java

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


  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.api.recording.dump;
  27 
  28 import java.nio.file.Files;
  29 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.jfr.consumer.RecordingFile;
  35 import jdk.test.lib.Asserts;
  36 import jdk.test.lib.jfr.Events;
  37 import jdk.test.lib.jfr.SimpleEventHelper;
  38 
  39 /*
  40  * @test
  41  * @summary Test copyTo and parse file
  42  * @key jfr

  43  * @library /test/lib
  44  * @run main/othervm jdk.jfr.api.recording.dump.TestDumpMultiple
  45  */
  46 public class TestDumpMultiple {
  47 
  48     public static void main(String[] args) throws Exception {
  49         Recording rA = new Recording();
  50         Recording rB = new Recording();
  51 
  52         // Enable event in one recording and disable in the other.
  53         // Both recordings should still get the events, since we always
  54         // get the "union" of all settings.
  55         SimpleEventHelper.enable(rA, true);
  56         SimpleEventHelper.enable(rB, false);
  57 
  58         SimpleEventHelper.createEvent(0); // To no recording
  59 
  60         rA.start();
  61         SimpleEventHelper.createEvent(1); // Only to recA
  62 




  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.api.recording.dump;
  27 
  28 import java.nio.file.Files;
  29 import java.nio.file.Path;
  30 import java.nio.file.Paths;
  31 
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.jfr.consumer.RecordingFile;
  35 import jdk.test.lib.Asserts;
  36 import jdk.test.lib.jfr.Events;
  37 import jdk.test.lib.jfr.SimpleEventHelper;
  38 
  39 /**
  40  * @test
  41  * @summary Test copyTo and parse file
  42  * @key jfr
  43  * @requires vm.hasJFR
  44  * @library /test/lib
  45  * @run main/othervm jdk.jfr.api.recording.dump.TestDumpMultiple
  46  */
  47 public class TestDumpMultiple {
  48 
  49     public static void main(String[] args) throws Exception {
  50         Recording rA = new Recording();
  51         Recording rB = new Recording();
  52 
  53         // Enable event in one recording and disable in the other.
  54         // Both recordings should still get the events, since we always
  55         // get the "union" of all settings.
  56         SimpleEventHelper.enable(rA, true);
  57         SimpleEventHelper.enable(rB, false);
  58 
  59         SimpleEventHelper.createEvent(0); // To no recording
  60 
  61         rA.start();
  62         SimpleEventHelper.createEvent(1); // Only to recA
  63 


< prev index next >