Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ public static void makeOldAllocations() {
int replaceIndex = r.nextInt(ArraySize);
int deriveIndex = r.nextInt(ArraySize);
switch (i & 0x3) {
Copy link
Member

Choose a reason for hiding this comment

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

...otherwise could you just do (i & 0x1) here and change cases 2 & 3 to cases 0 & 1?

case 0:
// 50% chance of creating garbage
array[replaceIndex] = array[replaceIndex].max(array[deriveIndex]);
break;
case 1:
// 50% chance of creating garbage
array[replaceIndex] = array[replaceIndex].min(array[deriveIndex]);
break;
Copy link
Member

Choose a reason for hiding this comment

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

Could you have left this in place & reduced the heap size of the UseCompactHeaders test to half the current setting to induce the trigger?

case 2:
// creates new old BigInteger, releases old BigInteger,
// may create ephemeral data while computing gcd
Expand Down Expand Up @@ -106,5 +98,17 @@ public static void main(String[] args) throws Exception {
"-XX:ShenandoahGuaranteedYoungGCInterval=0",
"-XX:ShenandoahGuaranteedOldGCInterval=0"
);

testOld("-Xlog:gc",
"-Xms96m",
"-Xmx96m",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UseShenandoahGC",
"-XX:ShenandoahGCMode=generational",
"-XX:ShenandoahGuaranteedYoungGCInterval=0",
"-XX:ShenandoahGuaranteedOldGCInterval=0",
"-XX:+UseCompactObjectHeaders"
);
}
}