Support for dynamic write-barrier counters everywhere.
R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/421923003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
1273155b74
commit
c0f6b34199
@ -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()) {
|
||||
|
@ -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()) {
|
||||
|
@ -508,10 +508,6 @@ void MacroAssembler::RecordWriteForMap(
|
||||
// Compute the address.
|
||||
lea(address, FieldOperand(object, HeapObject::kMapOffset));
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// A single check of the map's pages interesting flag suffices, since it is
|
||||
// only set during incremental collection, and then it's also guaranteed that
|
||||
// the from object's page's interesting flag is also set. This optimization
|
||||
@ -529,6 +525,10 @@ void MacroAssembler::RecordWriteForMap(
|
||||
|
||||
bind(&done);
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// Clobber clobbered input registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
@ -565,10 +565,6 @@ void MacroAssembler::RecordWrite(
|
||||
bind(&ok);
|
||||
}
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// First, check if a write barrier is even needed. The tests below
|
||||
// catch stores of Smis and stores into young gen.
|
||||
Label done;
|
||||
@ -599,6 +595,10 @@ 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);
|
||||
|
||||
// Clobber clobbered registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
|
@ -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()) {
|
||||
|
@ -237,10 +237,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()) {
|
||||
ld(at, FieldMemOperand(object, HeapObject::kMapOffset));
|
||||
Check(eq,
|
||||
@ -283,6 +279,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()) {
|
||||
@ -318,10 +318,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;
|
||||
@ -357,6 +353,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()) {
|
||||
|
@ -405,10 +405,6 @@ void MacroAssembler::RecordWriteForMap(Register object,
|
||||
// Compute the address.
|
||||
leap(dst, FieldOperand(object, HeapObject::kMapOffset));
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// First, check if a write barrier is even needed. The tests below
|
||||
// catch stores of smis and stores into the young generation.
|
||||
Label done;
|
||||
@ -430,6 +426,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);
|
||||
|
||||
// Clobber clobbered registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
@ -465,10 +465,6 @@ void MacroAssembler::RecordWrite(
|
||||
bind(&ok);
|
||||
}
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// First, check if a write barrier is even needed. The tests below
|
||||
// catch stores of smis and stores into the young generation.
|
||||
Label done;
|
||||
@ -500,6 +496,10 @@ 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);
|
||||
|
||||
// Clobber clobbered registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
|
@ -428,10 +428,6 @@ void MacroAssembler::RecordWriteForMap(
|
||||
// Compute the address.
|
||||
lea(address, FieldOperand(object, HeapObject::kMapOffset));
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// A single check of the map's pages interesting flag suffices, since it is
|
||||
// only set during incremental collection, and then it's also guaranteed that
|
||||
// the from object's page's interesting flag is also set. This optimization
|
||||
@ -448,6 +444,10 @@ void MacroAssembler::RecordWriteForMap(
|
||||
|
||||
bind(&done);
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// Clobber clobbered input registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
@ -483,10 +483,6 @@ void MacroAssembler::RecordWrite(
|
||||
bind(&ok);
|
||||
}
|
||||
|
||||
// Count number of write barriers in generated code.
|
||||
isolate()->counters()->write_barriers_static()->Increment();
|
||||
IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1);
|
||||
|
||||
// First, check if a write barrier is even needed. The tests below
|
||||
// catch stores of Smis and stores into young gen.
|
||||
Label done;
|
||||
@ -517,6 +513,10 @@ 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);
|
||||
|
||||
// Clobber clobbered registers when running with the debug-code flag
|
||||
// turned on to provoke errors.
|
||||
if (emit_debug_code()) {
|
||||
|
Loading…
Reference in New Issue
Block a user