Fix calculation of concurrent_start_bytes in GrowForUtilization()
Concurrent_start_bytes currently is assigned product of bytes
allocated bytes during last GC and time spent (in seconds) in it.
Instead it should be just bytes allocated.
Bug: 71902460
Test: test-art-host
Change-Id: I6b8322756eb6464b4581311ea7e7c90ecb2cb5ae
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 9edba96..590bffb 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3499,10 +3499,8 @@
const uint64_t bytes_allocated_during_gc = bytes_allocated + freed_bytes -
bytes_allocated_before_gc;
// Calculate when to perform the next ConcurrentGC.
- // Calculate the estimated GC duration.
- const double gc_duration_seconds = NsToMs(current_gc_iteration_.GetDurationNs()) / 1000.0;
// Estimate how many remaining bytes we will have when we need to start the next GC.
- size_t remaining_bytes = bytes_allocated_during_gc * gc_duration_seconds;
+ size_t remaining_bytes = bytes_allocated_during_gc;
remaining_bytes = std::min(remaining_bytes, kMaxConcurrentRemainingBytes);
remaining_bytes = std::max(remaining_bytes, kMinConcurrentRemainingBytes);
if (UNLIKELY(remaining_bytes > max_allowed_footprint_)) {