8316585: [REDO] runtime/InvocationTests spend a lot of time on dependency verification
Reviewed-by: vlivanov, stuefe, mli
This commit is contained in:
parent
0275efac88
commit
1e930db3c7
@ -35,6 +35,7 @@ public abstract class AbstractGenerator {
|
||||
protected final boolean dumpClasses;
|
||||
protected final boolean executeTests;
|
||||
private static int testNum = 0;
|
||||
private static int classesBeforeGC = 0;
|
||||
|
||||
protected AbstractGenerator(String[] args) {
|
||||
List<String> params = new ArrayList<String>(Arrays.asList(args));
|
||||
@ -96,6 +97,14 @@ public abstract class AbstractGenerator {
|
||||
|
||||
testNum++;
|
||||
|
||||
// Every N-th classes, force a GC to kick out the loaded classes from previous tests.
|
||||
// Different tests come in with different number of classes, so testNum is not reliable.
|
||||
classesBeforeGC -= classes.size();
|
||||
if (classesBeforeGC <= 0) {
|
||||
System.gc();
|
||||
classesBeforeGC = 3000;
|
||||
}
|
||||
|
||||
String caseDescription = String.format("%4d| %s", testNum, description);
|
||||
|
||||
// Create test executor for a single case
|
||||
|
Loading…
Reference in New Issue
Block a user