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

Unified Diff: runtime/vm/assembler_arm64.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_arm.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 004ae2148191ee5a0be867214001958d4ceff888..54dcabbf927d2d98641db8c615c0b9fe617ce104 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -1243,6 +1243,23 @@ void Assembler::LeaveStubFrame() {
}
+#ifndef PRODUCT
+void Assembler::MaybeTraceAllocation(intptr_t cid,
+ Register temp_reg,
+ Label* trace) {
+ ASSERT(cid > 0);
+ intptr_t state_offset = ClassTable::StateOffsetFor(cid);
+ LoadIsolate(temp_reg);
+ intptr_t table_offset =
+ Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
+ ldr(temp_reg, Address(temp_reg, table_offset));
+ AddImmediate(temp_reg, temp_reg, state_offset);
+ ldr(temp_reg, Address(temp_reg, 0));
+ tsti(temp_reg, Immediate(ClassHeapStats::TraceAllocationMask()));
+ b(trace, NE);
+}
+
+
void Assembler::UpdateAllocationStats(intptr_t cid,
Heap::Space space) {
ASSERT(cid > 0);
@@ -1282,22 +1299,7 @@ void Assembler::UpdateAllocationStatsWithSize(intptr_t cid,
add(TMP, TMP, Operand(size_reg));
str(TMP, Address(TMP2, size_field_offset));
}
-
-
-void Assembler::MaybeTraceAllocation(intptr_t cid,
- Register temp_reg,
- Label* trace) {
- ASSERT(cid > 0);
- intptr_t state_offset = ClassTable::StateOffsetFor(cid);
- LoadIsolate(temp_reg);
- intptr_t table_offset =
- Isolate::class_table_offset() + ClassTable::TableOffsetFor(cid);
- ldr(temp_reg, Address(temp_reg, table_offset));
- AddImmediate(temp_reg, temp_reg, state_offset);
- ldr(temp_reg, Address(temp_reg, 0));
- tsti(temp_reg, Immediate(ClassHeapStats::TraceAllocationMask()));
- b(trace, NE);
-}
+#endif // !PRODUCT
void Assembler::TryAllocate(const Class& cls,
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698