Index: src/arm64/macro-assembler-arm64.cc |
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc |
index 083f7747e8426bdd0db2c10e97fbe2c18d04b9ca..8626244a4d4c570bda76e13dc76630820f7d16ce 100644 |
--- a/src/arm64/macro-assembler-arm64.cc |
+++ b/src/arm64/macro-assembler-arm64.cc |
@@ -4428,10 +4428,6 @@ void MacroAssembler::RecordWriteForMap(Register object, |
Check(eq, kWrongAddressOrValuePassedToRecordWrite); |
} |
- // 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; |
@@ -4459,6 +4455,11 @@ 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, map, |
+ dst); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |
@@ -4494,10 +4495,6 @@ void MacroAssembler::RecordWrite( |
Check(eq, kWrongAddressOrValuePassedToRecordWrite); |
} |
- // 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; |
@@ -4531,6 +4528,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, address, |
+ value); |
+ |
// Clobber clobbered registers when running with the debug-code flag |
// turned on to provoke errors. |
if (emit_debug_code()) { |