mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-22 08:21:27 +00:00
8208251: serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorGCCMSTest.java fails intermittently on Linux-X64
Lower the interval rate and check GC objects too Reviewed-by: dcubed, sspitsyn
This commit is contained in:
parent
5bafe6f9a0
commit
5b9175eae8
@ -43,13 +43,17 @@ public class HeapMonitorGCTest {
|
||||
throw new RuntimeException("Statistics should be null to begin with.");
|
||||
}
|
||||
|
||||
// Put sampling rate to 100k to ensure samples are collected.
|
||||
HeapMonitor.setSamplingInterval(100 * 1024);
|
||||
|
||||
HeapMonitor.enableSamplingEvents();
|
||||
|
||||
List<Frame> frameList = HeapMonitor.allocate();
|
||||
frameList.add(new Frame("main", "([Ljava/lang/String;)V", "HeapMonitorGCTest.java", 48));
|
||||
frameList.add(new Frame("main", "([Ljava/lang/String;)V", "HeapMonitorGCTest.java", 51));
|
||||
Frame[] frames = frameList.toArray(new Frame[0]);
|
||||
|
||||
if (!HeapMonitor.obtainedEvents(frames)) {
|
||||
if (!HeapMonitor.obtainedEvents(frames)
|
||||
&& !HeapMonitor.garbageContains(frames)) {
|
||||
throw new RuntimeException("No expected events were found.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user