< prev index next >

test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorTest.java

Print this page
rev 49244 : [mq]: event-only
rev 49247 : [mq]: event5

*** 40,59 **** public static void main(String[] args) { if (!HeapMonitor.eventStorageIsEmpty()) { throw new RuntimeException("Storage is not empty at test start..."); } ! HeapMonitor.enableSampling(); List<Frame> frameList = HeapMonitor.allocate(); frameList.add(new Frame("main", "([Ljava/lang/String;)V", "HeapMonitorTest.java", 46)); Frame[] frames = frameList.toArray(new Frame[0]); if (!HeapMonitor.obtainedEvents(frames)) { throw new RuntimeException("Events not found with the right frames."); } ! HeapMonitor.disableSampling(); HeapMonitor.resetEventStorage(); if (!HeapMonitor.eventStorageIsEmpty()) { throw new RuntimeException("Storage is not empty after reset."); } --- 40,59 ---- public static void main(String[] args) { if (!HeapMonitor.eventStorageIsEmpty()) { throw new RuntimeException("Storage is not empty at test start..."); } ! HeapMonitor.enableSamplingRate(); List<Frame> frameList = HeapMonitor.allocate(); frameList.add(new Frame("main", "([Ljava/lang/String;)V", "HeapMonitorTest.java", 46)); Frame[] frames = frameList.toArray(new Frame[0]); if (!HeapMonitor.obtainedEvents(frames)) { throw new RuntimeException("Events not found with the right frames."); } ! HeapMonitor.disableSamplingRate(); HeapMonitor.resetEventStorage(); if (!HeapMonitor.eventStorageIsEmpty()) { throw new RuntimeException("Storage is not empty after reset."); }
< prev index next >