Commit 429e93bd authored by lkelvin's avatar lkelvin Committed by Commit bot

PPC/s390: [heap] New heuristics for incremental marking step size.

Port: 1beb89f2

This patch simplifies code for speeding up marking and
removes write barrier counter.

The step size is now computed based in two parts:
- bytes to mark in order to keep up with allocation,
- bytes to mark in order to make progress.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2378053003
Cr-Commit-Position: refs/heads/master@{#39876}
parent fb7904c6
......@@ -3120,19 +3120,6 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
Label need_incremental;
Label need_incremental_pop_scratch;
DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
__ lis(r0, Operand((~Page::kPageAlignmentMask >> 16)));
__ and_(regs_.scratch0(), regs_.object(), r0);
__ LoadP(
regs_.scratch1(),
MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset));
__ subi(regs_.scratch1(), regs_.scratch1(), Operand(1));
__ StoreP(
regs_.scratch1(),
MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset));
__ cmpi(regs_.scratch1(), Operand::Zero()); // PPC, we could do better here
__ blt(&need_incremental);
// 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);
......
......@@ -3064,18 +3064,6 @@ void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
Label need_incremental;
Label need_incremental_pop_scratch;
DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0);
__ AndP(regs_.scratch0(), regs_.object(), Operand(~Page::kPageAlignmentMask));
__ LoadP(
regs_.scratch1(),
MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset));
__ SubP(regs_.scratch1(), regs_.scratch1(), Operand(1));
__ StoreP(
regs_.scratch1(),
MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset));
__ CmpP(regs_.scratch1(), Operand::Zero()); // S390, we could do better here
__ blt(&need_incremental);
// 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment