diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-08-09 01:01:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-09 00:52:40 +0000 |
commit | c5ec29d29a2044454900290e3ccc8f092ab201d1 (patch) | |
tree | be2d900f4430026d546d80e0559f841237a8a178 | |
parent | e74fcc4ba2dc57fb663a81ced62ec950b87f2832 (diff) | |
parent | 376fc3caf0f0b9cb63592ff3bac06420f6b13ba8 (diff) | |
download | android_art-c5ec29d29a2044454900290e3ccc8f092ab201d1.tar.gz android_art-c5ec29d29a2044454900290e3ccc8f092ab201d1.tar.bz2 android_art-c5ec29d29a2044454900290e3ccc8f092ab201d1.zip |
Merge "Check pause histogram sample size."
-rw-r--r-- | runtime/gc/collector/garbage_collector.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/gc/collector/garbage_collector.cc b/runtime/gc/collector/garbage_collector.cc index 646c0328f8..07b61e6cf0 100644 --- a/runtime/gc/collector/garbage_collector.cc +++ b/runtime/gc/collector/garbage_collector.cc @@ -195,9 +195,11 @@ void GarbageCollector::DumpPerformanceInfo(std::ostream& os) { const uint64_t freed_objects = GetTotalFreedObjects(); { MutexLock mu(Thread::Current(), pause_histogram_lock_); - Histogram<uint64_t>::CumulativeData cumulative_data; - pause_histogram_.CreateHistogram(&cumulative_data); - pause_histogram_.PrintConfidenceIntervals(os, 0.99, cumulative_data); + if (pause_histogram_.SampleSize() > 0) { + Histogram<uint64_t>::CumulativeData cumulative_data; + pause_histogram_.CreateHistogram(&cumulative_data); + pause_histogram_.PrintConfidenceIntervals(os, 0.99, cumulative_data); + } } os << GetName() << " total time: " << PrettyDuration(total_ns) << " mean time: " << PrettyDuration(total_ns / iterations) << "\n" |