diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 23ee05c2ca946a..8beb115dbba737 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -322,11 +322,6 @@ static vector GetArgumentArray( // TODO(b/109998449): only assume JDK >= 9 for embedded JDKs if (!globals->options->GetEmbeddedJavabase().empty()) { - // In JDK9 we have seen a slow down when using the default G1 collector - // and thus switch back to parallel gc. - result.push_back("-XX:+UseParallelOldGC"); - // see: https://github.com/google/protobuf/issues/3781 - // quiet warnings from com.google.protobuf.UnsafeUtil, // see: https://github.com/google/protobuf/issues/3781 result.push_back("--add-opens=java.base/java.nio=ALL-UNNAMED"); diff --git a/tools/jdk/default_java_toolchain.bzl b/tools/jdk/default_java_toolchain.bzl index 3fdcfc1c7b540c..c71f1eee0d1fca 100644 --- a/tools/jdk/default_java_toolchain.bzl +++ b/tools/jdk/default_java_toolchain.bzl @@ -19,10 +19,6 @@ JDK8_JVM_OPTS = [ ] JDK9_JVM_OPTS = [ - # In JDK9 we have seen a ~30% slow down in JavaBuilder performance when using - # G1 collector and having compact strings enabled. - "-XX:+UseParallelOldGC", - "-XX:-CompactStrings", # Allow JavaBuilder to access internal javac APIs. "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", "--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",