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

Unified Diff: src/heap/heap.cc

Issue 1271823006: Revert of GC: Refactor public incremental marking interface in heap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 047795058fcad0666ffe03ae7aec56f5263597eb..6a4acda903ed8cb6e7a95288b041f79197114b81 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -769,8 +769,7 @@
void Heap::HandleGCRequest() {
if (incremental_marking()->request_type() ==
IncrementalMarking::COMPLETE_MARKING) {
- CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt",
- incremental_marking()->CallbackFlags());
+ CollectAllGarbage(Heap::kNoGCFlags, "GC interrupt");
return;
}
DCHECK(FLAG_overapproximate_weak_closure);
@@ -980,7 +979,7 @@
if (!mark_compact_collector()->abort_incremental_marking() &&
incremental_marking()->IsStopped() &&
incremental_marking()->ShouldActivateEvenWithoutIdleNotification()) {
- incremental_marking()->Start(kNoGCFlags, kNoGCCallbackFlags, "GC epilogue");
+ incremental_marking()->Start(kNoGCFlags);
}
return next_gc_likely_to_collect_more;
@@ -1007,18 +1006,9 @@
}
-void Heap::StartIncrementalMarking(int gc_flags,
- const GCCallbackFlags gc_callback_flags,
- const char* reason) {
- DCHECK(incremental_marking()->IsStopped());
- incremental_marking()->Start(gc_flags, gc_callback_flags, reason);
-}
-
-
void Heap::StartIdleIncrementalMarking() {
gc_idle_time_handler_.ResetNoProgressCounter();
- StartIncrementalMarking(kReduceMemoryFootprintMask, kNoGCCallbackFlags,
- "idle");
+ incremental_marking()->Start(kReduceMemoryFootprintMask);
}
@@ -4800,21 +4790,13 @@
double Heap::AdvanceIncrementalMarking(
intptr_t step_size_in_bytes, double deadline_in_ms,
- IncrementalMarking::StepActions step_actions) {
+ IncrementalMarking::ForceCompletionAction completion) {
DCHECK(!incremental_marking()->IsStopped());
-
- if (step_size_in_bytes == 0) {
- step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize(
- static_cast<size_t>(GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs),
- static_cast<size_t>(
- tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond()));
- }
-
double remaining_time_in_ms = 0.0;
do {
- incremental_marking()->Step(
- step_size_in_bytes, step_actions.completion_action,
- step_actions.force_marking, step_actions.force_completion);
+ incremental_marking()->Step(step_size_in_bytes,
+ IncrementalMarking::NO_GC_VIA_STACK_GUARD,
+ IncrementalMarking::FORCE_MARKING, completion);
remaining_time_in_ms = deadline_in_ms - MonotonicallyIncreasingTimeInMs();
} while (remaining_time_in_ms >=
2.0 * GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs &&
@@ -4833,9 +4815,9 @@
result = true;
break;
case DO_INCREMENTAL_MARKING: {
- const double remaining_idle_time_in_ms =
- AdvanceIncrementalMarking(action.parameter, deadline_in_ms,
- IncrementalMarking::NoForcedStepActions());
+ const double remaining_idle_time_in_ms = AdvanceIncrementalMarking(
+ action.parameter, deadline_in_ms,
+ IncrementalMarking::DO_NOT_FORCE_COMPLETION);
if (remaining_idle_time_in_ms > 0.0) {
action.additional_work = TryFinalizeIdleIncrementalMarking(
remaining_idle_time_in_ms, heap_state.size_of_objects,
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698