Improve the generational mode.

- Turn the compile-time flags for generational mode into a command
  line flag.

- In the generational mode, always collect the whole heap, as opposed
  to the bump pointer space only, if a collection is an explicit,
  native allocation-triggered or last attempt one.

Change-Id: I7a14a707cc47e6e3aa4a3292db62533409f17563
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 91d9b94..3cdf289 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -367,6 +367,8 @@
       collector_type = gc::kCollectorTypeCMS;
     } else if (gc_options[i] == "SS") {
       collector_type = gc::kCollectorTypeSS;
+    } else if (gc_options[i] == "GSS") {
+      collector_type = gc::kCollectorTypeGSS;
     } else {
       LOG(WARNING) << "Ignoring unknown -Xgc option: " << gc_options[i];
       return gc::kCollectorTypeNone;
@@ -399,7 +401,8 @@
   // Only the main GC thread, no workers.
   parsed->conc_gc_threads_ = 0;
   // Default is CMS which is Sticky + Partial + Full CMS GC.
-  parsed->collector_type_ = gc::kCollectorTypeCMS;
+  // parsed->collector_type_ = gc::kCollectorTypeCMS;
+  parsed->collector_type_ = gc::kCollectorTypeGSS;
   // If background_collector_type_ is kCollectorTypeNone, it defaults to the collector_type_ after
   // parsing options.
   parsed->background_collector_type_ = gc::kCollectorTypeNone;