diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-12-18 18:24:39 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-12-18 18:24:39 -0800 |
commit | 23f6e69e374ce4a7fd0d45f633a3c9efcc8e8a07 (patch) | |
tree | 38d80321f7132212d358c1f4f851906a50886d7a /runtime | |
parent | 16b10882f4ce9e5822b278ef0b0adf83afa1b334 (diff) | |
download | art-23f6e69e374ce4a7fd0d45f633a3c9efcc8e8a07.zip art-23f6e69e374ce4a7fd0d45f633a3c9efcc8e8a07.tar.gz art-23f6e69e374ce4a7fd0d45f633a3c9efcc8e8a07.tar.bz2 |
Only dump suspend all histogram if we have samples
Helps fix gcstress ThreadStress.
Bug: 18576985
Change-Id: Ibebc0fed8a21e7b149f4b6e5154fb86deddcc68f
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/thread_list.cc | 9 |
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); |