From c9747ef3be08a8f0c6cad619aeaa5eae7e850dcf Mon Sep 17 00:00:00 2001 From: David Schlosnagle Date: Thu, 11 Aug 2022 08:24:50 -0400 Subject: [PATCH] Enable String Deduplication on JDK 17+ Only enable on JDK 17+ due to https://bugs.openjdk.org/browse/JDK-8277981 --- .../com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java index f30cb6c6e..24e382e6c 100644 --- a/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java +++ b/gradle-sls-packaging/src/main/java/com/palantir/gradle/dist/service/tasks/LaunchConfigTask.java @@ -61,6 +61,7 @@ public abstract class LaunchConfigTask extends DefaultTask { private static final ImmutableList java15Options = ImmutableList.of("-XX:+UnlockDiagnosticVMOptions", "-XX:+ExpandSubTypeCheckAtParseTime"); private static final ImmutableList java17PlusOptions = ImmutableList.of( + "-XX:+UseStringDeduplication", // only enable on JDK 17+ due to https://bugs.openjdk.org/browse/JDK-8277981 "-Xlog:async"); // remove if/when async is default, see https://bugs.openjdk.org/browse/JDK-8291898 private static final ImmutableList disableBiasedLocking = ImmutableList.of("-XX:-UseBiasedLocking"); // Disable C2 compilation for problematic structure in JDK 11.0.16, see https://bugs.openjdk.org/browse/JDK-8291665