< prev index next >

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

Print this page
rev 48556 : [mq]: heap17
rev 48561 : [mq]: heap22
rev 48565 : [mq]: event

*** 34,44 **** */ public class HeapMonitorCachedTest { private static native boolean cachedAndLiveAreSame(); ! private static native void getLiveTracesToForceGc(); private static native long getCachedHashCode(); public static void main(String[] args) { HeapMonitor.enableSampling(); List<Frame> frameList = HeapMonitor.repeatAllocate(10); --- 34,44 ---- */ public class HeapMonitorCachedTest { private static native boolean cachedAndLiveAreSame(); ! private static native boolean forceGC(); private static native long getCachedHashCode(); public static void main(String[] args) { HeapMonitor.enableSampling(); List<Frame> frameList = HeapMonitor.repeatAllocate(10);
*** 50,60 **** if (!status) { throw new RuntimeException("Failed to find the traces before the wipe out."); } // Check cached & live are the same after a GC. ! getLiveTracesToForceGc(); status = cachedAndLiveAreSame(); if (!status) { throw new RuntimeException("Cached frames and live frames are not the same."); } --- 50,61 ---- if (!status) { throw new RuntimeException("Failed to find the traces before the wipe out."); } // Check cached & live are the same after a GC. ! System.gc(); ! status = cachedAndLiveAreSame(); if (!status) { throw new RuntimeException("Cached frames and live frames are not the same."); }
< prev index next >