ART: make generational CC a runtime option
Add -Xgc:[no]generational_cc option to control whether generational
Concurrent Copy collector is enabled when art is launched.
Repurpose the environment variable and preprocessor macro name
`ART_USE_GENERATIONAL_CC` to selecting the default behavior (if unset,
the default is to use Generational CC collection by default).
Test: Run art with -Xgc:[no]generational_cc along with -XX:DumpGCPerformanceOnShutdown on some benchmarks to see if minor GC runs. parsed_options_test is updated to test this new option.
Test: make test-art-host-gtest-parsed_options_test
Test: make test-art-target-gtest-parsed_options_test
Bug: 112187497
Bug: 67628039
Change-Id: I6b4660b06f7e793911a2601bed24c33777190741
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 4a04259..6fd691f 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -703,6 +703,7 @@
UsageMessage(stream, " -Xgc:[no]postsweepingverify_rosalloc\n");
UsageMessage(stream, " -Xgc:[no]postverify_rosalloc\n");
UsageMessage(stream, " -Xgc:[no]presweepingverify\n");
+ UsageMessage(stream, " -Xgc:[no]generational_cc\n");
UsageMessage(stream, " -Ximage:filename\n");
UsageMessage(stream, " -Xbootclasspath-locations:bootclasspath\n"
" (override the dex locations of the -Xbootclasspath files)\n");