Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

When a full GC is requested via System.gc() or at the end of a libgraal compilation, the policy is asked whether to do an incremental collection first, but does not have the information that a full GC will happen either way. In case of CompactingOldGen, it would prefer to do the full GC immediately, which this change enables.

This change can make a difference with benchmarks, which commonly trigger GC between iterations. While the collections are excluded from reported iteration times, they typically are not excluded from footprint measurements. Future policy decisions can also be negatively impacted by the unnecessary collections.

The change does not have an impact with CopyingOldGen, which is the current default. With CompactingOldGen, it leads to significant improvements for scaladoc and kiama, and potentially lusearch, sunflow and scala-doku.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 10, 2025
@graalvmbot graalvmbot merged commit eb1d4f4 into master Nov 10, 2025
13 checks passed
@graalvmbot graalvmbot deleted the ph/GR-71271 branch November 10, 2025 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

2 participants