Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(497)

Unified Diff: src/heap/incremental-marking.cc

Issue 2850373003: [heap] Fix computation of marking progress in incremental finalization. (Closed)
Patch Set: rearrange summands Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/sequential-marking-deque.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index cef34117a84f8473426b79c99545f827089a8916..5767ad5596e1db27680b5dc8b4670c83a82a46e8 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -711,8 +711,6 @@ void IncrementalMarking::FinalizeIncrementally() {
double start = heap_->MonotonicallyIncreasingTimeInMs();
- int old_marking_deque_top = marking_deque()->top();
-
// After finishing incremental marking, we try to discover all unmarked
// objects to reduce the marking load in the final pause.
// 1) We scan and mark the roots again to find all changes to the root set.
@@ -728,10 +726,10 @@ void IncrementalMarking::FinalizeIncrementally() {
}
ProcessWeakCells();
- int marking_progress = abs(old_marking_deque_top - marking_deque()->top());
-
- marking_progress += static_cast<int>(
- heap_->local_embedder_heap_tracer()->NumberOfCachedWrappersToTrace());
+ int marking_progress =
+ heap_->mark_compact_collector()->marking_deque()->Size() +
+ static_cast<int>(
+ heap_->local_embedder_heap_tracer()->NumberOfCachedWrappersToTrace());
double end = heap_->MonotonicallyIncreasingTimeInMs();
double delta = end - start;
« no previous file with comments | « no previous file | src/heap/sequential-marking-deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698