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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 51653006: Track live instance and allocation counts for classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index f80f8564c69ac935734b0ea1c9f0ef33d76bebde..b329fb1ba8e35398a9766af5668781a723cdab37 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -78,7 +78,7 @@ void Intrinsifier::List_Allocate(Assembler* assembler) {
__ movq(R13, Immediate(heap->TopAddress()));
__ movq(Address(R13, 0), RCX);
__ addq(RAX, Immediate(kHeapObjectTag));
-
+ __ UpdateAllocationStatsWithSize(kArrayCid, RDI);
// Initialize the tags.
// RAX: new object start as a tagged pointer.
// RDI: allocation size.
@@ -259,6 +259,7 @@ void Intrinsifier::GrowableList_Allocate(Assembler* assembler) {
// Set the length field in the growable array object to 0.
__ movq(FieldAddress(RAX, GrowableObjectArray::length_offset()),
Immediate(0));
+ __ UpdateAllocationStats(kGrowableObjectArrayCid);
__ ret(); // returns the newly allocated object in RAX.
__ Bind(&fall_through);
@@ -446,7 +447,7 @@ void Intrinsifier::GrowableList_add(Assembler* assembler) {
__ movq(R13, Immediate(heap->TopAddress())); \
__ movq(Address(R13, 0), RCX); \
__ addq(RAX, Immediate(kHeapObjectTag)); \
- \
+ __ UpdateAllocationStatsWithSize(cid, RDI); \
/* Initialize the tags. */ \
/* RAX: new object start as a tagged pointer. */ \
/* RCX: new object end address. */ \
@@ -1469,6 +1470,7 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ movq(R13, Immediate(heap->TopAddress()));
__ movq(Address(R13, 0), RCX);
__ addq(RAX, Immediate(kHeapObjectTag));
+ __ UpdateAllocationStatsWithSize(kOneByteStringCid, RDI);
// Initialize the tags.
// RAX: new object start as a tagged pointer.
« no previous file with comments | « runtime/vm/intrinsifier_mips.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698