Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable G1 for Bazel and the Java host toolchain. #8423

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/main/cpp/blaze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,6 @@ static vector<string> 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");
Expand Down
4 changes: 0 additions & 4 deletions tools/jdk/default_java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down