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

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

Issue 1869663002: Version 5.1.282.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1.282
Patch Set: Created 4 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 | « src/heap/gc-idle-time-handler.h ('k') | no next file » | 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 686c6738821437a1621c4f495391632813ae58e3..33b708dc5bd24a1454498525507c4a741dd1c327 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -1011,17 +1011,20 @@ double IncrementalMarking::AdvanceIncrementalMarking(
heap()
->tracer()
->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond());
- double remaining_time_in_ms =
- deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs();
- while (remaining_time_in_ms >=
- GCIdleTimeHandler::kMinIncrementalMarkingStepTimeInMs) {
- intptr_t bytes_processed =
+ double remaining_time_in_ms = 0.0;
+ intptr_t bytes_processed = 0;
+
+ do {
+ bytes_processed =
Step(step_size_in_bytes, step_actions.completion_action,
step_actions.force_marking, step_actions.force_completion);
remaining_time_in_ms =
deadline_in_ms - heap()->MonotonicallyIncreasingTimeInMs();
- if (bytes_processed == 0) break;
- }
+ } while (bytes_processed > 0 &&
+ remaining_time_in_ms >=
+ 2.0 * GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs &&
+ !IsComplete() &&
+ !heap()->mark_compact_collector()->marking_deque()->IsEmpty());
return remaining_time_in_ms;
}
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698