Reviewers: Erik Corry, danno, Paul Lind, kisg,

Description:
MIPS: Make the speed of incremental marking depend also on the rate at which we
are hitting expensive write barrier operations, not just on the rate of
allocation.

Port r12618 (c621b025)

BUG=
TEST=


Please review this at https://chromiumcodereview.appspot.com/10977070/

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

Affected files:
  M src/mips/code-stubs-mips.cc


Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 86af0dd97fea3bc1ae63d786157531a9dbee58f8..28588ba3bf756074d8b270a877c3e9e687c345d5 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -7637,6 +7637,16 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
   Label need_incremental;
   Label need_incremental_pop_scratch;

+ __ And(regs_.scratch0(), regs_.object(), Operand(~Page::kPageAlignmentMask));
+  __ lw(regs_.scratch1(),
+        MemOperand(regs_.scratch0(),
+                   MemoryChunk::kWriteBarrierCounterOffset));
+  __ Subu(regs_.scratch1(), regs_.scratch1(), Operand(1));
+  __ sw(regs_.scratch1(),
+         MemOperand(regs_.scratch0(),
+                    MemoryChunk::kWriteBarrierCounterOffset));
+  __ Branch(&need_incremental, lt, regs_.scratch1(), Operand(zero_reg));
+
// Let's look at the color of the object: If it is not black we don't have
   // to inform the incremental marker.
__ JumpIfBlack(regs_.object(), regs_.scratch0(), regs_.scratch1(), &on_black);


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to