Add developer option for dumping GC cumulative timings on shutdown.
The option is "-XX:DumpGCPerformanceOnShutdown".
Bug: 9986416
Change-Id: If6ebb26b3e611a9dead197740dbfc64e548dc388
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 08c0ba0..71ad252 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -368,6 +368,7 @@
parsed->long_pause_log_threshold_ = gc::Heap::kDefaultLongPauseLogThreshold;
parsed->long_gc_log_threshold_ = gc::Heap::kDefaultLongGCLogThreshold;
+ parsed->dump_gc_performance_on_shutdown_ = false;
parsed->ignore_max_footprint_ = false;
parsed->lock_profiling_threshold_ = 0;
@@ -528,6 +529,8 @@
} else if (option == "-XX:LongGCLogThreshold") {
parsed->long_gc_log_threshold_ =
ParseMemoryOption(option.substr(strlen("-XX:LongGCLogThreshold")).c_str(), 1024);
+ } else if (option == "-XX:DumpGCPerformanceOnShutdown") {
+ parsed->dump_gc_performance_on_shutdown_ = true;
} else if (option == "-XX:IgnoreMaxFootprint") {
parsed->ignore_max_footprint_ = true;
} else if (option == "-XX:LowMemoryMode") {
@@ -912,6 +915,7 @@
options->low_memory_mode_,
options->long_pause_log_threshold_,
options->long_gc_log_threshold_,
+ options->dump_gc_performance_on_shutdown_,
options->ignore_max_footprint_);
BlockSignals();