diff options
| author | 2018-02-21 17:40:01 +0000 | |
|---|---|---|
| committer | 2018-02-21 17:40:01 +0000 | |
| commit | ea81a71bdad720ba494461d4e8f6d21e6a0ac4f4 (patch) | |
| tree | 080d94ccaf776766b08b62a5e92c48ccfca64250 | |
| parent | 8567751dd80a71d73ad0208a43f040e8c0ff753f (diff) | |
| parent | 99bd16bfd0cebb338dd33473cdf71176d560d6a3 (diff) | |
Merge "Extend error reporting in art::gc::Heap::GrowForUtilization."
| -rw-r--r-- | runtime/gc/heap.cc | 3 | ||||
| -rw-r--r-- | runtime/gc/heap.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 17913fc2dc..cb4360171a 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -3453,7 +3453,8 @@ void Heap::GrowForUtilization(collector::GarbageCollector* collector_ran, if (gc_type != collector::kGcTypeSticky) { // Grow the heap for non sticky GC. ssize_t delta = bytes_allocated / GetTargetHeapUtilization() - bytes_allocated; - CHECK_GE(delta, 0); + CHECK_GE(delta, 0) << "bytes_allocated=" << bytes_allocated + << " target_utilization_=" << target_utilization_; target_size = bytes_allocated + delta * multiplier; target_size = std::min(target_size, bytes_allocated + adjusted_max_free); target_size = std::max(target_size, bytes_allocated + adjusted_min_free); diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 7fb634fcf7..9d2d2ed514 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -1331,7 +1331,7 @@ class Heap { // The ideal maximum free size, when we grow the heap for utilization. size_t max_free_; - // Target ideal heap utilization ratio + // Target ideal heap utilization ratio. double target_utilization_; // How much more we grow the heap when we are a foreground app instead of background. |