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

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

Issue 1273483002: GC: Refactor public incremental marking interface in heap (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed nit 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/incremental-marking.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 947c961af8993d6efc959d4d1c7765a1c2e352a1..f9b7319eb0cfab1a080893f0996967a87d0ee3b2 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -16,6 +16,13 @@ namespace v8 {
namespace internal {
+IncrementalMarking::StepActions IncrementalMarking::NoForcedStepActions() {
+ return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD,
+ IncrementalMarking::DO_NOT_FORCE_MARKING,
+ IncrementalMarking::DO_NOT_FORCE_COMPLETION);
+}
+
+
IncrementalMarking::IncrementalMarking(Heap* heap)
: heap_(heap),
state_(STOPPED),
@@ -470,9 +477,12 @@ static void PatchIncrementalMarkingRecordWriteStubs(
}
-void IncrementalMarking::Start(int mark_compact_flags) {
+void IncrementalMarking::Start(int mark_compact_flags,
+ const GCCallbackFlags gc_callback_flags,
+ const char* reason) {
if (FLAG_trace_incremental_marking) {
- PrintF("[IncrementalMarking] Start\n");
+ PrintF("[IncrementalMarking] Start (%s)\n",
+ (reason == nullptr) ? "unknown reason" : reason);
}
DCHECK(FLAG_incremental_marking);
DCHECK(FLAG_incremental_marking_steps);
@@ -482,6 +492,7 @@ void IncrementalMarking::Start(int mark_compact_flags) {
ResetStepCounters();
+ gc_callback_flags_ = gc_callback_flags;
was_activated_ = true;
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
@@ -824,7 +835,7 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
if (IsStopped() && ShouldActivateEvenWithoutIdleNotification()) {
- Start(Heap::kNoGCFlags);
+ Start(Heap::kNoGCFlags, kNoGCCallbackFlags, "old space step");
} else {
Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD);
}
« no previous file with comments | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698