Use thread-cpu-time for deciding which GC to perform next
We use GC throughput (bytes-freed) in Heap::GrowForUtilization() to
decide which GC shall be done the next time. The current expectation is
that the current GC, if young, shall be at least 2x in throughput as
compared to the mean throughput of full-heap GCs for the next GC to be
also young. Otherwise, we choose full-heap GC.
Using wall-clock time is noisy as it's not in GC-thread's control how
much CPU it gets. Often, due to unavailablity of CPU, it has to wait on
the CPU's ready-queue in runnable state.
Flag: EXEMPT bugfix
Test: manual
Bug: 343220989
Change-Id: I85795914a8d98622f51a1d68a770bbcbe4015a97
2 files changed