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

Unified Diff: runtime/vm/intrinsifier_arm64.cc

Issue 2974403002: Revert "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/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm64.cc
diff --git a/runtime/vm/intrinsifier_arm64.cc b/runtime/vm/intrinsifier_arm64.cc
index c8a4c041b8f7df11b033d9a93ad1179d83e8bf68..3c5f4f6c341544c753153f0fa936edda62308192 100644
--- a/runtime/vm/intrinsifier_arm64.cc
+++ b/runtime/vm/intrinsifier_arm64.cc
@@ -200,8 +200,9 @@ static int GetScaleFactor(intptr_t size) {
sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ AddImmediate(R2, fixed_size_plus_alignment_padding); \
__ andi(R2, R2, Immediate(~(kObjectAlignment - 1))); \
- NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \
- __ ldr(R0, Address(THR, Thread::top_offset())); \
+ Heap::Space space = Heap::kNew; \
+ __ ldr(R3, Address(THR, Thread::heap_offset())); \
+ __ ldr(R0, Address(R3, Heap::TopOffset(space))); \
\
/* R2: allocation size. */ \
__ adds(R1, R0, Operand(R2)); \
@@ -211,13 +212,14 @@ static int GetScaleFactor(intptr_t size) {
/* R0: potential new object start. */ \
/* R1: potential next object start. */ \
/* R2: allocation size. */ \
- __ ldr(R6, Address(THR, Thread::end_offset())); \
+ /* R3: heap. */ \
+ __ ldr(R6, Address(R3, Heap::EndOffset(space))); \
__ cmp(R1, Operand(R6)); \
__ b(&fall_through, CS); \
\
/* Successfully allocated the object(s), now update top to point to */ \
/* next object start and initialize the object. */ \
- __ str(R1, Address(THR, Thread::top_offset())); \
+ __ str(R1, Address(R3, Heap::TopOffset(space))); \
__ AddImmediate(R0, kHeapObjectTag); \
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, R2, space)); \
/* Initialize the tags. */ \
@@ -2093,8 +2095,9 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ andi(length_reg, length_reg, Immediate(~(kObjectAlignment - 1)));
const intptr_t cid = kOneByteStringCid;
- NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
- __ ldr(R0, Address(THR, Thread::top_offset()));
+ Heap::Space space = Heap::kNew;
+ __ ldr(R3, Address(THR, Thread::heap_offset()));
+ __ ldr(R0, Address(R3, Heap::TopOffset(space)));
// length_reg: allocation size.
__ adds(R1, R0, Operand(length_reg));
@@ -2104,13 +2107,14 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// R0: potential new object start.
// R1: potential next object start.
// R2: allocation size.
- __ ldr(R7, Address(THR, Thread::end_offset()));
+ // R3: heap.
+ __ ldr(R7, Address(R3, Heap::EndOffset(space)));
__ cmp(R1, Operand(R7));
__ b(&fail, CS);
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
- __ str(R1, Address(THR, Thread::top_offset()));
+ __ str(R1, Address(R3, Heap::TopOffset(space)));
__ AddImmediate(R0, kHeapObjectTag);
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, R2, space));
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698