Commit 3bebee41 authored by Hannes Payer's avatar Hannes Payer Committed by Commit Bot

[heap] Increment MarkCompact epoch right after marking.

Bug: v8:9093
Change-Id: I69aa3edddf5ea52e1cca185fa03f51122cdf02c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1617937
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61668}
parent 990084ba
......@@ -853,8 +853,6 @@ void MarkCompactCollector::VerifyMarking() {
void MarkCompactCollector::Finish() {
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_FINISH);
epoch_++;
#ifdef DEBUG
heap()->VerifyCountersBeforeConcurrentSweeping();
#endif
......@@ -1924,6 +1922,8 @@ void MarkCompactCollector::MarkLiveObjects() {
if (was_marked_incrementally_) {
heap()->incremental_marking()->Deactivate();
}
epoch_++;
}
void MarkCompactCollector::ClearNonLiveReferences() {
......
......@@ -909,9 +909,11 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
MarkingState marking_state_;
NonAtomicMarkingState non_atomic_marking_state_;
// Counts the number of mark-compact collections. This is used for marking
// descriptor arrays. See NumberOfMarkedDescriptors. Only lower two bits are
// used, so it is okay if this counter overflows and wraps around.
// Counts the number of major mark-compact collections. The counter is
// incremented right after marking. This is used for:
// - marking descriptor arrays. See NumberOfMarkedDescriptors. Only the lower
// two bits are used, so it is okay if this counter overflows and wraps
// around.
unsigned epoch_ = 0;
friend class FullEvacuator;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment