summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-12-19 02:32:37 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-19 02:32:37 +0000
commit6d1a047b4b3f9707d4ee1cc19e99717ee021ef48 (patch)
tree38d80321f7132212d358c1f4f851906a50886d7a
parent16b10882f4ce9e5822b278ef0b0adf83afa1b334 (diff)
parent23f6e69e374ce4a7fd0d45f633a3c9efcc8e8a07 (diff)
downloadart-6d1a047b4b3f9707d4ee1cc19e99717ee021ef48.zip
art-6d1a047b4b3f9707d4ee1cc19e99717ee021ef48.tar.gz
art-6d1a047b4b3f9707d4ee1cc19e99717ee021ef48.tar.bz2
Merge "Only dump suspend all histogram if we have samples"
-rw-r--r--runtime/thread_list.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 968e89d..9707c7b 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -101,9 +101,12 @@ void ThreadList::DumpNativeStacks(std::ostream& os) {
void ThreadList::DumpForSigQuit(std::ostream& os) {
{
ScopedObjectAccess soa(Thread::Current());
- Histogram<uint64_t>::CumulativeData data;
- suspend_all_historam_.CreateHistogram(&data);
- suspend_all_historam_.PrintConfidenceIntervals(os, 0.99, data); // Dump time to suspend.
+ // Only print if we have samples.
+ if (suspend_all_historam_.SampleSize() > 0) {
+ Histogram<uint64_t>::CumulativeData data;
+ suspend_all_historam_.CreateHistogram(&data);
+ suspend_all_historam_.PrintConfidenceIntervals(os, 0.99, data); // Dump time to suspend.
+ }
}
Dump(os);
DumpUnattachedThreads(os);