Skip to content

Commit cd1d3e0

Browse files
committed
8272318: Improve performance of HeapDumpAllTest
Backport-of: 73da66ffb707abf6dc38368a12e337d52597de25
1 parent 3a650aa commit cd1d3e0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/hotspot/jtreg/serviceability/dcmd/gc/HeapDumpAllTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* questions.
2222
*/
2323

24+
import java.io.IOException;
25+
26+
import jdk.test.lib.dcmd.CommandExecutor;
27+
2428
/*
2529
* @test
2630
* @summary Test of diagnostic command GC.heap_dump -all=true
@@ -37,6 +41,14 @@ public HeapDumpAllTest() {
3741
heapDumpArgs = "-all=true";
3842
}
3943

44+
@Override
45+
public void run(CommandExecutor executor, boolean overwrite) throws IOException {
46+
// Trigger gc by hand, so the created heap dump isnt't too large and
47+
// takes too long to parse.
48+
System.gc();
49+
super.run(executor, overwrite);
50+
}
51+
4052
/* See HeapDumpTest for test cases */
4153
}
4254

0 commit comments

Comments
 (0)