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

Unified Diff: runtime/vm/assembler_arm.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 | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index bca44b7dde3b54af4d91bbb31878a0d563fc9e9b..db7881d4c278a3abe36ef5e13d88bbff5fd56072 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -3237,6 +3237,18 @@ void Assembler::LeaveStubFrame() {
}
+#ifndef PRODUCT
+void Assembler::MaybeTraceAllocation(intptr_t cid,
+ Register temp_reg,
+ Label* trace) {
+ LoadAllocationStatsAddress(temp_reg, cid);
+ const uword state_offset = ClassHeapStats::state_offset();
+ ldr(temp_reg, Address(temp_reg, state_offset));
+ tst(temp_reg, Operand(ClassHeapStats::TraceAllocationMask()));
+ b(trace, NE);
+}
+
+
void Assembler::LoadAllocationStatsAddress(Register dest,
intptr_t cid) {
ASSERT(dest != kNoRegister);
@@ -3251,17 +3263,6 @@ void Assembler::LoadAllocationStatsAddress(Register dest,
}
-void Assembler::MaybeTraceAllocation(intptr_t cid,
- Register temp_reg,
- Label* trace) {
- LoadAllocationStatsAddress(temp_reg, cid);
- const uword state_offset = ClassHeapStats::state_offset();
- ldr(temp_reg, Address(temp_reg, state_offset));
- tst(temp_reg, Operand(ClassHeapStats::TraceAllocationMask()));
- b(trace, NE);
-}
-
-
void Assembler::IncrementAllocationStats(Register stats_addr_reg,
intptr_t cid,
Heap::Space space) {
@@ -3298,6 +3299,7 @@ void Assembler::IncrementAllocationStatsWithSize(Register stats_addr_reg,
add(TMP, TMP, Operand(size_reg));
str(TMP, size_address);
}
+#endif // !PRODUCT
void Assembler::TryAllocate(const Class& cls,
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698