< prev index next >

test/jdk/jdk/jfr/jvm/TestLargeJavaEvent512k.java

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


  26 package jdk.jfr.jvm;
  27 
  28 import java.io.IOException;
  29 import java.time.Duration;
  30 import java.util.ArrayList;
  31 import java.util.Collections;
  32 import java.util.HashMap;
  33 import java.util.List;
  34 import java.util.Map;
  35 
  36 import jdk.jfr.Event;
  37 import jdk.jfr.EventFactory;
  38 import jdk.jfr.Recording;
  39 import jdk.jfr.ValueDescriptor;
  40 import jdk.jfr.consumer.RecordedEvent;
  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.jfr.EventTypePrototype;
  43 import jdk.test.lib.jfr.Events;
  44 import jdk.test.lib.jfr.Stressor;
  45 
  46 /*
  47  * @test TestLargeJavaEvent512k
  48  * @key jfr

  49  * @library /test/lib
  50  * @modules jdk.jfr/jdk.jfr.internal
  51  *    java.base/jdk.internal.org.objectweb.asm
  52  * @run main/othervm jdk.jfr.jvm.TestLargeJavaEvent512k
  53  */
  54 public class TestLargeJavaEvent512k {
  55     static boolean error;
  56     static void setError() {
  57         error = true;
  58     }
  59     static boolean hasError() {
  60         return error;
  61     }
  62 
  63     public static void main(String... args) throws Exception {
  64         final String name = "MyLargeJavaEvent512k"; // name of synthetically generated event
  65         final String fieldNamePrefix = "myfield";
  66         final int numberOfFields = 64; // 64*8k = 512k event size
  67         final Map<String, Object> eventMap = new HashMap<>();
  68         final int numberOfThreads = 10; // 10 threads will run the test




  26 package jdk.jfr.jvm;
  27 
  28 import java.io.IOException;
  29 import java.time.Duration;
  30 import java.util.ArrayList;
  31 import java.util.Collections;
  32 import java.util.HashMap;
  33 import java.util.List;
  34 import java.util.Map;
  35 
  36 import jdk.jfr.Event;
  37 import jdk.jfr.EventFactory;
  38 import jdk.jfr.Recording;
  39 import jdk.jfr.ValueDescriptor;
  40 import jdk.jfr.consumer.RecordedEvent;
  41 import jdk.test.lib.Asserts;
  42 import jdk.test.lib.jfr.EventTypePrototype;
  43 import jdk.test.lib.jfr.Events;
  44 import jdk.test.lib.jfr.Stressor;
  45 
  46 /**
  47  * @test TestLargeJavaEvent512k
  48  * @key jfr
  49  * @requires vm.hasJFR
  50  * @library /test/lib
  51  * @modules jdk.jfr/jdk.jfr.internal
  52  *    java.base/jdk.internal.org.objectweb.asm
  53  * @run main/othervm jdk.jfr.jvm.TestLargeJavaEvent512k
  54  */
  55 public class TestLargeJavaEvent512k {
  56     static boolean error;
  57     static void setError() {
  58         error = true;
  59     }
  60     static boolean hasError() {
  61         return error;
  62     }
  63 
  64     public static void main(String... args) throws Exception {
  65         final String name = "MyLargeJavaEvent512k"; // name of synthetically generated event
  66         final String fieldNamePrefix = "myfield";
  67         final int numberOfFields = 64; // 64*8k = 512k event size
  68         final Map<String, Object> eventMap = new HashMap<>();
  69         final int numberOfThreads = 10; // 10 threads will run the test


< prev index next >