diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-04-09 11:41:49 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-04-09 11:41:49 -0700 |
commit | b6898f55d27d40b60e1a4b0036ae809cc9123cee (patch) | |
tree | bbf160543a0f904ce1e21d0c4098dfa8a7630802 /runtime/gc | |
parent | dc9009e32d3c94e42614245fdf3fa024a5721aec (diff) | |
download | art-b6898f55d27d40b60e1a4b0036ae809cc9123cee.zip art-b6898f55d27d40b60e1a4b0036ae809cc9123cee.tar.gz art-b6898f55d27d40b60e1a4b0036ae809cc9123cee.tar.bz2 |
Add mean GC duration to DumpGcPerformanceInfo.
Change-Id: Ibd68e9d8cae71d0ceb769fc975f1148287e9ca4a
Diffstat (limited to 'runtime/gc')
-rw-r--r-- | runtime/gc/heap.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 72b8449..91f249a 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -662,12 +662,12 @@ void Heap::DumpGcPerformanceInfo(std::ostream& os) { // Dump cumulative timings. os << "Dumping cumulative Gc timings\n"; uint64_t total_duration = 0; - // Dump cumulative loggers for each GC type. uint64_t total_paused_time = 0; for (auto& collector : garbage_collectors_) { const CumulativeLogger& logger = collector->GetCumulativeTimings(); - if (logger.GetTotalNs() != 0) { + const size_t iterations = logger.GetIterations(); + if (iterations != 0) { os << ConstDumpable<CumulativeLogger>(logger); const uint64_t total_ns = logger.GetTotalNs(); const uint64_t total_pause_ns = collector->GetTotalPausedTimeNs(); @@ -677,7 +677,8 @@ void Heap::DumpGcPerformanceInfo(std::ostream& os) { Histogram<uint64_t>::CumulativeData cumulative_data; collector->GetPauseHistogram().CreateHistogram(&cumulative_data); collector->GetPauseHistogram().PrintConfidenceIntervals(os, 0.99, cumulative_data); - os << collector->GetName() << " total time: " << PrettyDuration(total_ns) << "\n" + os << collector->GetName() << " total time: " << PrettyDuration(total_ns) + << " mean time: " << PrettyDuration(total_ns / iterations) << "\n" << collector->GetName() << " freed: " << freed_objects << " objects with total size " << PrettySize(freed_bytes) << "\n" << collector->GetName() << " throughput: " << freed_objects / seconds << "/s / " |