Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 2980033002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/simulator_dbc.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index c94c9a134b41c0a7cb1245a5735d967383b8ed0f..b2264c78821721eb557d11d858e4d9e1f967868a 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -685,10 +685,9 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
__ bic(R9, R9, Operand(kObjectAlignment - 1));
// R9: Allocation size.
- Heap::Space space = Heap::kNew;
- __ ldr(R8, Address(THR, Thread::heap_offset()));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
// Potential new object start.
- __ ldr(R0, Address(R8, Heap::TopOffset(space)));
+ __ ldr(R0, Address(THR, Thread::top_offset()));
__ adds(NOTFP, R0, Operand(R9)); // Potential next object start.
__ b(&slow_case, CS); // Branch if unsigned overflow.
@@ -696,14 +695,14 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
// R0: potential new object start.
// NOTFP: potential next object start.
// R9: allocation size.
- __ ldr(R3, Address(R8, Heap::EndOffset(space)));
+ __ ldr(R3, Address(THR, Thread::end_offset()));
__ cmp(NOTFP, Operand(R3));
__ b(&slow_case, CS);
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
NOT_IN_PRODUCT(__ LoadAllocationStatsAddress(R3, cid));
- __ str(NOTFP, Address(R8, Heap::TopOffset(space)));
+ __ str(R7, Address(THR, Thread::top_offset()));
__ add(R0, R0, Operand(kHeapObjectTag));
// Initialize the tags.
@@ -910,17 +909,15 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
// R1: number of context variables.
// R2: object size.
const intptr_t cid = kContextCid;
- Heap::Space space = Heap::kNew;
- __ ldr(R9, Address(THR, Thread::heap_offset()));
- __ ldr(R0, Address(R9, Heap::TopOffset(space)));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
+ __ ldr(R0, Address(THR, Thread::top_offset()));
__ add(R3, R2, Operand(R0));
// Check if the allocation fits into the remaining space.
// R0: potential new object.
// R1: number of context variables.
// R2: object size.
// R3: potential next object start.
- // R9: heap.
- __ ldr(IP, Address(R9, Heap::EndOffset(space)));
+ __ ldr(IP, Address(THR, Thread::end_offset()));
__ cmp(R3, Operand(IP));
if (FLAG_use_slow_path) {
__ b(&slow_case);
@@ -934,9 +931,8 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
// R1: number of context variables.
// R2: object size.
// R3: next object start.
- // R9: heap.
NOT_IN_PRODUCT(__ LoadAllocationStatsAddress(R4, cid));
- __ str(R3, Address(R9, Heap::TopOffset(space)));
+ __ str(R3, Address(THR, Thread::top_offset()));
__ add(R0, R0, Operand(kHeapObjectTag));
// Calculate the size tag.
@@ -1106,22 +1102,20 @@ void StubCode::GenerateAllocationStubForClass(Assembler* assembler,
Label slow_case;
// Allocate the object and update top to point to
// next object start and initialize the allocated object.
- Heap::Space space = Heap::kNew;
- __ ldr(R9, Address(THR, Thread::heap_offset()));
- __ ldr(R0, Address(R9, Heap::TopOffset(space)));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
+ __ ldr(R0, Address(THR, Thread::top_offset()));
__ AddImmediate(R1, R0, instance_size);
// Check if the allocation fits into the remaining space.
// R0: potential new object start.
// R1: potential next object start.
- // R9: heap.
- __ ldr(IP, Address(R9, Heap::EndOffset(space)));
+ __ ldr(IP, Address(THR, Thread::end_offset()));
__ cmp(R1, Operand(IP));
if (FLAG_use_slow_path) {
__ b(&slow_case);
} else {
__ b(&slow_case, CS); // Unsigned higher or equal.
}
- __ str(R1, Address(R9, Heap::TopOffset(space)));
+ __ str(R1, Address(THR, Thread::top_offset()));
// Load the address of the allocation stats table. We split up the load
// and the increment so that the dependent load is not too nearby.
« no previous file with comments | « runtime/vm/simulator_dbc.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698