< prev index next >

test/jdk/jdk/jfr/event/gc/heapsummary/TestHeapSummaryCommittedSize.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.event.gc.heapsummary;
  27 
  28 import java.time.Duration;
  29 
  30 import jdk.jfr.Recording;
  31 import jdk.jfr.consumer.RecordedEvent;
  32 import jdk.test.lib.Asserts;
  33 import jdk.test.lib.jfr.EventNames;
  34 import jdk.test.lib.jfr.EventVerifier;
  35 import jdk.test.lib.jfr.Events;
  36 import jdk.test.lib.jfr.GCHelper;
  37 import sun.hotspot.WhiteBox;
  38 
  39 /*
  40  * @test
  41  * @key jfr

  42  * @requires vm.gc == "Parallel" | vm.gc == null
  43  * @library /test/lib /test/jdk
  44  * @build sun.hotspot.WhiteBox
  45  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  46  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  47                      -XX:-UseFastUnorderedTimeStamps -Xmx16m -XX:+UseParallelGC
  48                      -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  49                      jdk.jfr.event.gc.heapsummary.TestHeapSummaryCommittedSize
  50  */
  51 public class TestHeapSummaryCommittedSize {
  52     private final static String EVENT_NAME = EventNames.GCHeapSummary;
  53 
  54     public static void main(String[] args) throws Exception {
  55         Recording recording = new Recording();
  56         recording.enable(EVENT_NAME).withThreshold(Duration.ofMillis(0));
  57 
  58         recording.start();
  59         System.gc();
  60         recording.stop();
  61 




  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.event.gc.heapsummary;
  27 
  28 import java.time.Duration;
  29 
  30 import jdk.jfr.Recording;
  31 import jdk.jfr.consumer.RecordedEvent;
  32 import jdk.test.lib.Asserts;
  33 import jdk.test.lib.jfr.EventNames;
  34 import jdk.test.lib.jfr.EventVerifier;
  35 import jdk.test.lib.jfr.Events;
  36 import jdk.test.lib.jfr.GCHelper;
  37 import sun.hotspot.WhiteBox;
  38 
  39 /**
  40  * @test
  41  * @key jfr
  42  * @requires vm.hasJFR
  43  * @requires vm.gc == "Parallel" | vm.gc == null
  44  * @library /test/lib /test/jdk
  45  * @build sun.hotspot.WhiteBox
  46  * @run main ClassFileInstaller sun.hotspot.WhiteBox
  47  * @run main/othervm -XX:+UnlockExperimentalVMOptions
  48                      -XX:-UseFastUnorderedTimeStamps -Xmx16m -XX:+UseParallelGC
  49                      -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI
  50                      jdk.jfr.event.gc.heapsummary.TestHeapSummaryCommittedSize
  51  */
  52 public class TestHeapSummaryCommittedSize {
  53     private final static String EVENT_NAME = EventNames.GCHeapSummary;
  54 
  55     public static void main(String[] args) throws Exception {
  56         Recording recording = new Recording();
  57         recording.enable(EVENT_NAME).withThreshold(Duration.ofMillis(0));
  58 
  59         recording.start();
  60         System.gc();
  61         recording.stop();
  62 


< prev index next >