uint32_t ArmJniCallingConvention::CoreSpillMask() const {
// Compute spill mask to agree with callee saves initialized in the constructor
uint32_t result = 0;
- result = 1 << R5 | 1 << R6 | 1 << R7 | 1 << R8 | 1 << R10 | 1 << R11 | 1 << LR;
+ result = 1 << R5 | 1 << R6 | 1 << R7 | 1 << R8 | 1 << R10 | 1 << R11 | 1 << LR;
return result;
}
namespace gc {
+static constexpr size_t kCollectorTransitionStressIterations = 0;
+static constexpr size_t kCollectorTransitionStressWait = 10 * 1000; // Microseconds
static constexpr bool kGCALotMode = false;
static constexpr size_t kGcAlotInterval = KB;
// Minimum amount of remaining bytes before a concurrent GC is triggered.
void Heap::UpdateProcessState(ProcessState process_state) {
if (process_state_ != process_state) {
process_state_ = process_state;
+ for (size_t i = 1; i <= kCollectorTransitionStressIterations; ++i) {
+ // Start at index 1 to avoid "is always false" warning.
+ // Have iteration 1 always transition the collector.
+ TransitionCollector((((i & 1) == 1) == (process_state_ == kProcessStateJankPerceptible))
+ ? post_zygote_collector_type_ : background_collector_type_);
+ usleep(kCollectorTransitionStressWait);
+ }
if (process_state_ == kProcessStateJankPerceptible) {
// Transition back to foreground right away to prevent jank.
RequestCollectorTransition(post_zygote_collector_type_, 0);