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

Unified Diff: runtime/vm/assembler_ia32.cc

Issue 2105383003: VM: Don't generate allocation stats code in product mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/assembler_arm64.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_ia32.cc
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index e8851ac6d4d94165991580a2d65549f388884f6a..6f798e0e0530ccf634745ce6eb9ed9619e31709d 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -2771,7 +2771,8 @@ void Assembler::TryAllocate(const Class& cls,
// If this allocation is traced, program will jump to failure path
// (i.e. the allocation stub) which will allocate the object and trace the
// allocation call site.
- MaybeTraceAllocation(cls.id(), temp_reg, failure, near_jump);
+ NOT_IN_PRODUCT(
+ MaybeTraceAllocation(cls.id(), temp_reg, failure, near_jump));
const intptr_t instance_size = cls.instance_size();
Heap::Space space = Heap::SpaceForAllocation(cls.id());
movl(temp_reg, Address(THR, Thread::heap_offset()));
@@ -2783,7 +2784,7 @@ void Assembler::TryAllocate(const Class& cls,
// Successfully allocated the object, now update top to point to
// next object start and store the class in the class field of object.
movl(Address(temp_reg, Heap::TopOffset(space)), instance_reg);
- UpdateAllocationStats(cls.id(), temp_reg, space);
+ NOT_IN_PRODUCT(UpdateAllocationStats(cls.id(), temp_reg, space));
ASSERT(instance_size >= kHeapObjectTag);
subl(instance_reg, Immediate(instance_size - kHeapObjectTag));
uword tags = 0;
@@ -2810,7 +2811,7 @@ void Assembler::TryAllocateArray(intptr_t cid,
// If this allocation is traced, program will jump to failure path
// (i.e. the allocation stub) which will allocate the object and trace the
// allocation call site.
- MaybeTraceAllocation(cid, temp_reg, failure, near_jump);
+ NOT_IN_PRODUCT(MaybeTraceAllocation(cid, temp_reg, failure, near_jump));
Heap::Space space = Heap::SpaceForAllocation(cid);
movl(temp_reg, Address(THR, Thread::heap_offset()));
movl(instance, Address(temp_reg, Heap::TopOffset(space)));
@@ -2829,7 +2830,8 @@ void Assembler::TryAllocateArray(intptr_t cid,
// next object start and initialize the object.
movl(Address(temp_reg, Heap::TopOffset(space)), end_address);
addl(instance, Immediate(kHeapObjectTag));
- UpdateAllocationStatsWithSize(cid, instance_size, temp_reg, space);
+ NOT_IN_PRODUCT(
+ UpdateAllocationStatsWithSize(cid, instance_size, temp_reg, space));
// Initialize the tags.
uword tags = 0;
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698