28 size_t mutator_marked_bytes = 0;
29 size_t concurrent_marked_bytes = 0;
30 size_t estimated_live_bytes = 0;
31 size_t expected_marked_bytes = 0;
35 return mutator_marked_bytes + concurrent_marked_bytes;
41 return static_cast<int64_t
>(marked_bytes()) - expected_marked_bytes;
56 static constexpr size_t kStepSizeWhenNotMakingProgress = 64 * 1024;
58 static std::unique_ptr<IncrementalMarkingSchedule> Create(
59 bool predictable_schedule =
false);
60 static std::unique_ptr<IncrementalMarkingSchedule>
61 CreateWithMarkedBytesPerStepForTesting(
size_t min_marked_bytes_per_step,
62 bool predictable_schedule =
false);
70 void NotifyIncrementalMarkingStart();
74 void NotifyConcurrentMarkingStart();
79 void AddMutatorThreadMarkedBytes(
size_t);
84 void AddConcurrentlyMarkedBytes(
size_t);
88 size_t GetNextIncrementalStepDuration(
size_t estimated_live_bytes);
98 bool ShouldFlushEphemeronPairs();
109 return min_marked_bytes_per_step_;
117 static constexpr double kEphemeronPairsFlushingRatioIncrements = 0.25;
120 bool predictable_schedule);
126 size_t GetOverallMarkedBytes()
const;
130 size_t GetConcurrentlyMarkedBytes()
const;
133 size_t mutator_thread_marked_bytes_ = 0;
134 std::atomic_size_t concurrently_marked_bytes_{0};
135 size_t last_estimated_live_bytes_ = 0;
136 double ephemeron_pairs_flushing_ratio_target_ = 0.25;
139 const bool predictable_schedule_ =
false;
141 size_t last_concurrently_marked_bytes_ = 0;