summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-06-05 17:01:27 -0700
committer Andreas Gampe <agampe@google.com> 2017-06-05 17:02:55 -0700
commit5544e721c3e2a3e344c26b9e1c9ad9472fb8cd58 (patch)
tree58e65b9003f06166bb330b395cd8017dd79ab2b8
parent4f101e5b6ae214a73bdd912374f5dc565d336e47 (diff)
ART: Replace some '\n' with std::endl
Induce flushing the ostreams at strategic points to improve log visibility. Bug: 62337922 Test: m test-art-host Change-Id: Ic4b4c698b568575b55160fff0ad5c31fa6b4018a
-rw-r--r--runtime/base/histogram-inl.h2
-rw-r--r--runtime/thread_list.cc5
2 files changed, 3 insertions, 4 deletions
diff --git a/runtime/base/histogram-inl.h b/runtime/base/histogram-inl.h
index b28eb729d8..be2092040d 100644
--- a/runtime/base/histogram-inl.h
+++ b/runtime/base/histogram-inl.h
@@ -198,7 +198,7 @@ inline void Histogram<Value>::PrintConfidenceIntervals(std::ostream &os, double
kFractionalDigits)
<< "-" << FormatDuration(Percentile(per_1, data) * kAdjust, unit, kFractionalDigits) << " "
<< "Avg: " << FormatDuration(Mean() * kAdjust, unit, kFractionalDigits) << " Max: "
- << FormatDuration(Max() * kAdjust, unit, kFractionalDigits) << "\n";
+ << FormatDuration(Max() * kAdjust, unit, kFractionalDigits) << std::endl;
}
template <class Value>
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 5094189dfc..95aba79ed7 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -165,7 +165,7 @@ static void DumpUnattachedThread(std::ostream& os, pid_t tid, bool dump_native_s
if (dump_native_stack) {
DumpNativeStack(os, tid, nullptr, " native: ");
}
- os << "\n";
+ os << std::endl;
}
void ThreadList::DumpUnattachedThreads(std::ostream& os, bool dump_native_stack) {
@@ -216,11 +216,10 @@ class DumpCheckpoint FINAL : public Closure {
ScopedObjectAccess soa(self);
thread->Dump(local_os, dump_native_stack_, backtrace_map_.get());
}
- local_os << "\n";
{
// Use the logging lock to ensure serialization when writing to the common ostream.
MutexLock mu(self, *Locks::logging_lock_);
- *os_ << local_os.str();
+ *os_ << local_os.str() << std::endl;
}
barrier_.Pass(self);
}