summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-08-09 01:01:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-09 00:52:40 +0000
commitc5ec29d29a2044454900290e3ccc8f092ab201d1 (patch)
treebe2d900f4430026d546d80e0559f841237a8a178
parente74fcc4ba2dc57fb663a81ced62ec950b87f2832 (diff)
parent376fc3caf0f0b9cb63592ff3bac06420f6b13ba8 (diff)
downloadandroid_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.cc8
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"