Skip to content

Commit

Permalink
native-image: Don't pass -H:InitialCollectionPolicy with EpsilonGC
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Nov 15, 2022
1 parent 8cf9bdc commit d9bce12
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -727,8 +727,12 @@ public NativeImageInvokerInfo build() {
*/
handleAdditionalProperties(nativeImageArgs);

nativeImageArgs.add(
"-H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime"); //the default collection policy results in full GC's 50% of the time
// Work around https://github.com/quarkusio/quarkus/issues/29275
if (!(nativeConfig.additionalBuildArgs.isPresent()
&& nativeConfig.additionalBuildArgs.get().contains("--gc=epsilon"))) {
nativeImageArgs.add(
"-H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime"); //the default collection policy results in full GC's 50% of the time
}
nativeImageArgs.add("-H:+AllowFoldMethods");

if (nativeConfig.headless) {
Expand Down

0 comments on commit d9bce12

Please sign in to comment.