changeset 53923:2708a32dc964

8214531: HeapMonitorEventOnOffTest.java test fails with "Statistics should be null to begin with" Summary: Remove the enable sampling and let the underlying method call it Reviewed-by: sspitsyn, phh
author jcbeyler
date Thu, 06 Dec 2018 14:18:39 -0800
parents db0173cac437
children 0d89f672c62e
files test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorEventOnOffTest.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorEventOnOffTest.java	Thu Dec 06 15:51:19 2018 -0500
+++ b/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorEventOnOffTest.java	Thu Dec 06 14:18:39 2018 -0800
@@ -35,7 +35,6 @@
  */
 public class HeapMonitorEventOnOffTest {
   public static void main(String[] args) {
-    HeapMonitor.enableSamplingEvents();
     HeapMonitor.allocateAndCheckFrames();
 
     // Disabling the notification system should stop events.
@@ -43,8 +42,8 @@
     HeapMonitor.resetEventStorage();
     HeapMonitor.allocateAndCheckFrames(false, false);
 
-    // Enabling the notification system should start events again.
-    HeapMonitor.enableSamplingEvents();
+    // By calling allocateAndCheckFrames(), we enable the notifications and check if allocations
+    // get sampled again.
     HeapMonitor.allocateAndCheckFrames();
   }
 }