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

Unified Diff: runtime/vm/assembler_mips.cc

Issue 2143153002: Don't track allocations in product mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: other archs Created 4 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/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index f2416cb52a0f34076fb958a938ee34484a79a599..954cea60ad8b8e49b62c1d88b691e4935e3fd38a 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -860,6 +860,26 @@ void Assembler::LeaveStubFrameAndReturn(Register ra) {
}
+#ifndef PRODUCT
+void Assembler::MaybeTraceAllocation(intptr_t cid,
+ Register temp_reg,
+ Label* trace) {
+ ASSERT(cid > 0);
+ ASSERT(!in_delay_slot_);
+ ASSERT(temp_reg != kNoRegister);
+ ASSERT(temp_reg != TMP);
+ intptr_t state_offset = ClassTable::StateOffsetFor(cid);
+ LoadIsolate(temp_reg);
+ intptr_t table_offset =
+ Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+ lw(temp_reg, Address(temp_reg, table_offset));
+ AddImmediate(temp_reg, state_offset);
+ lw(temp_reg, Address(temp_reg, 0));
+ andi(CMPRES1, temp_reg, Immediate(ClassHeapStats::TraceAllocationMask()));
+ bne(CMPRES1, ZR, trace);
+}
+
+
void Assembler::UpdateAllocationStats(intptr_t cid,
Register temp_reg,
Heap::Space space) {
@@ -907,25 +927,7 @@ void Assembler::UpdateAllocationStatsWithSize(intptr_t cid,
addu(TMP, TMP, size_reg);
sw(TMP, Address(temp_reg, size_field_offset));
}
-
-
-void Assembler::MaybeTraceAllocation(intptr_t cid,
- Register temp_reg,
- Label* trace) {
- ASSERT(cid > 0);
- ASSERT(!in_delay_slot_);
- ASSERT(temp_reg != kNoRegister);
- ASSERT(temp_reg != TMP);
- intptr_t state_offset = ClassTable::StateOffsetFor(cid);
- LoadIsolate(temp_reg);
- intptr_t table_offset =
- Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
- lw(temp_reg, Address(temp_reg, table_offset));
- AddImmediate(temp_reg, state_offset);
- lw(temp_reg, Address(temp_reg, 0));
- andi(CMPRES1, temp_reg, Immediate(ClassHeapStats::TraceAllocationMask()));
- bne(CMPRES1, ZR, trace);
-}
+#endif // !PRODUCT
void Assembler::TryAllocate(const Class& cls,
« no previous file with comments | « runtime/vm/assembler_ia32.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698