summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-04-15 12:40:17 -0700
committerMathieu Chartier <mathieuc@google.com>2014-04-15 12:41:41 -0700
commitdcee9eeaa1d6ad80301c2ca52145259ab83abb2a (patch)
tree165ce9b5b066646ee9a9497c39f1ec24e8e28238
parentebc726a931fd76a83a7dcdd3cf3505cee387cead (diff)
downloadart-dcee9eeaa1d6ad80301c2ca52145259ab83abb2a.zip
art-dcee9eeaa1d6ad80301c2ca52145259ab83abb2a.tar.gz
art-dcee9eeaa1d6ad80301c2ca52145259ab83abb2a.tar.bz2
Less confusing heap transition message.
The heap transition message now just says how long the transition took and up to how much memory was saved (it can still be negative). Change-Id: If421dcc2aa9cc40740b858dcc2ff1b8e595f9a40
-rw-r--r--runtime/gc/heap.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 0c09b47..07d0455 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -1412,7 +1412,6 @@ void Heap::TransitionCollector(CollectorType collector_type) {
VLOG(heap) << "TransitionCollector: " << static_cast<int>(collector_type_)
<< " -> " << static_cast<int>(collector_type);
uint64_t start_time = NanoTime();
- uint32_t before_size = GetTotalMemory();
uint32_t before_allocated = num_bytes_allocated_.Load();
ThreadList* tl = Runtime::Current()->GetThreadList();
Thread* self = Thread::Current();
@@ -1482,16 +1481,10 @@ void Heap::TransitionCollector(CollectorType collector_type) {
uint64_t duration = NanoTime() - start_time;
GrowForUtilization(semi_space_collector_);
FinishGC(self, collector::kGcTypeFull);
- int32_t after_size = GetTotalMemory();
- int32_t delta_size = before_size - after_size;
int32_t after_allocated = num_bytes_allocated_.Load();
int32_t delta_allocated = before_allocated - after_allocated;
- const std::string saved_bytes_str =
- delta_size < 0 ? "-" + PrettySize(-delta_size) : PrettySize(delta_size);
LOG(INFO) << "Heap transition to " << process_state_ << " took "
- << PrettyDuration(duration) << " " << PrettySize(before_size) << "->"
- << PrettySize(after_size) << " from " << PrettySize(delta_allocated) << " to "
- << PrettySize(delta_size) << " saved";
+ << PrettyDuration(duration) << " saved at least " << PrettySize(delta_allocated);
}
void Heap::ChangeCollector(CollectorType collector_type) {