Skip to content

Commit 0a9ab64

Browse files
author
duke
committed
Backport b4028c91d5615f43cbf209eeeb1014966de22a38
1 parent ece596a commit 0a9ab64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
* @requires vm.continuations
2828
* @modules jdk.management
2929
* @library /test/lib
30-
* @run junit/othervm/native --enable-native-access=ALL-UNNAMED UnmountedVThreadNativeMethodAtTop
30+
* @build jdk.test.whitebox.WhiteBox
31+
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
32+
* @run junit/othervm/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI --enable-native-access=ALL-UNNAMED UnmountedVThreadNativeMethodAtTop
3133
*/
3234

3335
import java.lang.management.ManagementFactory;
@@ -45,9 +47,12 @@
4547
import jdk.test.lib.hprof.model.Snapshot;
4648
import jdk.test.lib.hprof.model.ThreadObject;
4749
import jdk.test.lib.hprof.parser.Reader;
50+
import jdk.test.whitebox.WhiteBox;
4851

4952
public class UnmountedVThreadNativeMethodAtTop {
5053

54+
static WhiteBox wb = WhiteBox.getWhiteBox();
55+
5156
boolean done;
5257

5358
/**
@@ -56,7 +61,7 @@ public class UnmountedVThreadNativeMethodAtTop {
5661
*/
5762
@BeforeEach
5863
void doGC() {
59-
System.gc();
64+
wb.fullGC();
6065
}
6166

6267
/**

0 commit comments

Comments
 (0)