Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 80fac45148659395f97464330a684d2474f3d4be..08d045470fa32fb8b2a33a84da20371737384e26 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -233,10 +233,6 @@ void MacroAssembler::RecordWriteForMap(Register object, |
return; |
} |
- // Count number of write barriers in generated code. |
- isolate()->counters()->write_barriers_static()->Increment(); |
- // TODO(mstarzinger): Dynamic counter missing. |
- |
if (emit_debug_code()) { |
lw(at, FieldMemOperand(object, HeapObject::kMapOffset)); |
Check(eq, |
@@ -279,6 +275,10 @@ void MacroAssembler::RecordWriteForMap(Register object, |
bind(&done); |
+ // Count number of write barriers in generated code. |
+ isolate()->counters()->write_barriers_static()->Increment(); |
+ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at, dst); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |
@@ -314,10 +314,6 @@ void MacroAssembler::RecordWrite( |
return; |
} |
- // Count number of write barriers in generated code. |
- isolate()->counters()->write_barriers_static()->Increment(); |
- // TODO(mstarzinger): Dynamic counter missing. |
- |
// First, check if a write barrier is even needed. The tests below |
// catch stores of smis and stores into the young generation. |
Label done; |
@@ -353,6 +349,11 @@ void MacroAssembler::RecordWrite( |
bind(&done); |
+ // Count number of write barriers in generated code. |
+ isolate()->counters()->write_barriers_static()->Increment(); |
+ IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1, at, |
+ value); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |