Reviewers: ernstm, jochen,

Description:
Force incremental marking when called from idle notification.

BUG=

Please review this at https://codereview.chromium.org/426243002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -5 lines):
  M src/heap.cc
  M src/incremental-marking.h
  M src/incremental-marking.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 67ee043e0b1168d49e5fef8914fc9535cc575600..998cfe1c45df1fb74d8c77557b2e120642d4aff1 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4229,7 +4229,7 @@ void Heap::MakeHeapIterable() {

 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) {
   incremental_marking()->Step(step_size,
-                              IncrementalMarking::NO_GC_VIA_STACK_GUARD);
+ IncrementalMarking::NO_GC_VIA_STACK_GUARD, true);

   if (incremental_marking()->IsComplete()) {
     bool uncommit = false;
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 0ab9a002452e94aa7846816d14c73e9c4f349b7e..c98f117c24622c000593c67d72ab41c069ebf495 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -834,8 +834,8 @@ void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
 }


-void IncrementalMarking::Step(intptr_t allocated_bytes,
-                              CompletionAction action) {
+void IncrementalMarking::Step(intptr_t allocated_bytes, CompletionAction action,
+                              bool force_marking) {
   if (heap_->gc_state() != Heap::NOT_IN_GC ||
       !FLAG_incremental_marking ||
       !FLAG_incremental_marking_steps ||
@@ -845,7 +845,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes,

   allocated_ += allocated_bytes;

-  if (allocated_ < kAllocatedThreshold &&
+  if (!force_marking && allocated_ < kAllocatedThreshold &&
       write_barriers_invoked_since_last_step_ <
           kWriteBarriersInvokedThreshold) {
     return;
Index: src/incremental-marking.h
diff --git a/src/incremental-marking.h b/src/incremental-marking.h
index 20cfb018ae368b5a47504ebcd59a7a21dab654a1..ecb4b46618dcd2a396eb497cf193ae6915d6c1f7 100644
--- a/src/incremental-marking.h
+++ b/src/incremental-marking.h
@@ -91,7 +91,8 @@ class IncrementalMarking {

   void OldSpaceStep(intptr_t allocated);

-  void Step(intptr_t allocated, CompletionAction action);
+  void Step(intptr_t allocated, CompletionAction action,
+            bool force_marking = false);

   inline void RestartIfNotMarking() {
     if (state_ == COMPLETE) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to