diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index a99931bfc20f96..09760fcba3c7f4 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -420,12 +420,8 @@ 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 c518d026b374d7..f4dc03577c5e6b 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",