Skip to content


8316585: [REDO] runtime/InvocationTests spend a lot of time on depend…
Browse files Browse the repository at this point in the history
…ency verification

Backport-of: 1e930db3c7dec24223eea9f36052bb753f91e282
  • Loading branch information
shipilev committed Nov 8, 2023
1 parent 31c759d commit eb8267d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -96,6 +97,14 @@ protected boolean exec(Map<String, byte[]> classes, String description, String c


// 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) {
classesBeforeGC = 3000;

String caseDescription = String.format("%4d| %s", testNum, description);

// Create test executor for a single case
Expand Down

1 comment on commit eb8267d

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.