Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index b8cae01bc57d029b7f1a2f45ed88116a92b55b48..1adc79641781f44ffa93fa7440ec0cee37b5d9d1 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -521,10 +521,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()) { |
ldr(ip, FieldMemOperand(object, HeapObject::kMapOffset)); |
cmp(ip, map); |
@@ -565,6 +561,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, ip, dst); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |
@@ -598,10 +598,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; |
@@ -636,6 +632,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, ip, |
+ value); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |