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

Unified Diff: runtime/vm/intrinsifier_ia32.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_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index f222a5059628a73a36aaf717fc5237bed21de9bc..8b871ac105f96ecb553c17eb46cec4baf7ee3b23 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -76,6 +76,7 @@ void Intrinsifier::List_Allocate(Assembler* assembler) {
// next object start and initialize the object.
__ movl(Address::Absolute(heap->TopAddress()), EBX);
__ addl(EAX, Immediate(kHeapObjectTag));
+ __ UpdateAllocationStatsWithSize(kArrayCid, EDI, kNoRegister);
// Initialize the tags.
// EAX: new object start as a tagged pointer.
@@ -303,6 +304,7 @@ void Intrinsifier::GrowableList_Allocate(Assembler* assembler) {
// Set the length field in the growable array object to 0.
__ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()),
Immediate(0));
+ __ UpdateAllocationStats(kGrowableObjectArrayCid, EBX);
__ ret(); // returns the newly allocated object in EAX.
__ Bind(&fall_through);
@@ -492,6 +494,7 @@ void Intrinsifier::GrowableList_add(Assembler* assembler) {
/* next object start and initialize the object. */ \
__ movl(Address::Absolute(heap->TopAddress()), EBX); \
__ addl(EAX, Immediate(kHeapObjectTag)); \
+ __ UpdateAllocationStatsWithSize(cid, EDI, kNoRegister); \
\
/* Initialize the tags. */ \
/* EAX: new object start as a tagged pointer. */ \
@@ -856,7 +859,8 @@ void Intrinsifier::Integer_shl(Assembler* assembler) {
__ TryAllocate(mint_class,
&fall_through,
Assembler::kNearJump,
- EAX); // Result register.
+ EAX, // Result register.
+ kNoRegister);
// EBX and EDI are not objects but integer values.
__ movl(FieldAddress(EAX, Mint::value_offset()), EBX);
__ movl(FieldAddress(EAX, Mint::value_offset() + kWordSize), EDI);
@@ -1177,7 +1181,8 @@ static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
__ TryAllocate(double_class,
&fall_through,
Assembler::kNearJump,
- EAX); // Result register.
+ EAX, // Result register.
+ EBX);
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
__ ret();
__ Bind(&fall_through);
@@ -1222,7 +1227,8 @@ void Intrinsifier::Double_mulFromInteger(Assembler* assembler) {
__ TryAllocate(double_class,
&fall_through,
Assembler::kNearJump,
- EAX); // Result register.
+ EAX, // Result register.
+ EBX);
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
__ ret();
__ Bind(&fall_through);
@@ -1242,7 +1248,8 @@ void Intrinsifier::Double_fromInteger(Assembler* assembler) {
__ TryAllocate(double_class,
&fall_through,
Assembler::kNearJump,
- EAX); // Result register.
+ EAX, // Result register.
+ EBX);
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
__ ret();
__ Bind(&fall_through);
@@ -1315,7 +1322,8 @@ void Intrinsifier::Math_sqrt(Assembler* assembler) {
__ TryAllocate(double_class,
&fall_through,
Assembler::kNearJump,
- EAX); // Result register.
+ EAX, // Result register.
+ EBX);
__ movsd(FieldAddress(EAX, Double::value_offset()), XMM0);
__ ret();
__ Bind(&is_smi);
@@ -1556,6 +1564,8 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ movl(Address::Absolute(heap->TopAddress()), EBX);
__ addl(EAX, Immediate(kHeapObjectTag));
+ __ UpdateAllocationStatsWithSize(kOneByteStringCid, EDI, kNoRegister);
+
// Initialize the tags.
// EAX: new object start as a tagged pointer.
// EBX: new object end address.
« no previous file with comments | « runtime/vm/intrinsifier_arm.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698