From dcee9eeaa1d6ad80301c2ca52145259ab83abb2a Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Tue, 15 Apr 2014 12:40:17 -0700 Subject: [PATCH] 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 --- runtime/gc/heap.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 0c09b4741..07d04551b 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(collector_type_) << " -> " << static_cast(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) { -- 2.11.0