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

Unified Diff: runtime/vm/intrinsifier_arm.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/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index e1f820eaafd16d04f2b69227fca244d76e57321a..e1f929870499d06419850ab6dd0b8d696aa3a7d2 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -71,6 +71,7 @@ void Intrinsifier::List_Allocate(Assembler* assembler) {
// next object start and initialize the object.
__ str(R1, Address(R6, 0));
__ add(R0, R0, ShifterOperand(kHeapObjectTag));
+ __ UpdateAllocationStatsWithSize(kArrayCid, R2, R4);
// Initialize the tags.
// R0: new object start as a tagged pointer.
@@ -306,6 +307,7 @@ void Intrinsifier::GrowableList_Allocate(Assembler* assembler) {
// Set the length field in the growable array object to 0.
__ LoadImmediate(R1, 0);
__ str(R1, FieldAddress(R0, GrowableObjectArray::length_offset()));
+ __ UpdateAllocationStats(kGrowableObjectArrayCid, R1);
__ Ret(); // Returns the newly allocated object in R0.
__ Bind(&fall_through);
@@ -491,7 +493,7 @@ void Intrinsifier::GrowableList_add(Assembler* assembler) {
__ LoadImmediate(R3, heap->TopAddress()); \
__ str(R1, Address(R3, 0)); \
__ AddImmediate(R0, kHeapObjectTag); \
- \
+ __ UpdateAllocationStatsWithSize(cid, R2, R4); \
/* Initialize the tags. */ \
/* R0: new object start as a tagged pointer. */ \
/* R1: new object end address. */ \
@@ -846,7 +848,7 @@ void Intrinsifier::Integer_shl(Assembler* assembler) {
const Class& mint_class = Class::Handle(
Isolate::Current()->object_store()->mint_class());
- __ TryAllocate(mint_class, &fall_through, R0);
+ __ TryAllocate(mint_class, &fall_through, R0, R2);
__ str(R1, FieldAddress(R0, Mint::value_offset()));
@@ -1148,7 +1150,7 @@ static void DoubleArithmeticOperations(Assembler* assembler, Token::Kind kind) {
}
const Class& double_class = Class::Handle(
Isolate::Current()->object_store()->double_class());
- __ TryAllocate(double_class, &fall_through, R0); // Result register.
+ __ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
__ Bind(&fall_through);
@@ -1191,7 +1193,7 @@ void Intrinsifier::Double_mulFromInteger(Assembler* assembler) {
__ vmuld(D0, D0, D1);
const Class& double_class = Class::Handle(
Isolate::Current()->object_store()->double_class());
- __ TryAllocate(double_class, &fall_through, R0); // Result register.
+ __ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
__ Bind(&fall_through);
@@ -1210,7 +1212,7 @@ void Intrinsifier::Double_fromInteger(Assembler* assembler) {
__ vcvtdi(D0, S0);
const Class& double_class = Class::Handle(
Isolate::Current()->object_store()->double_class());
- __ TryAllocate(double_class, &fall_through, R0); // Result register.
+ __ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
__ Bind(&fall_through);
@@ -1291,7 +1293,7 @@ void Intrinsifier::Math_sqrt(Assembler* assembler) {
__ vsqrtd(D0, D1);
const Class& double_class = Class::Handle(
Isolate::Current()->object_store()->double_class());
- __ TryAllocate(double_class, &fall_through, R0); // Result register.
+ __ TryAllocate(double_class, &fall_through, R0, R1); // Result register.
__ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag);
__ Ret();
__ Bind(&is_smi);
@@ -1514,6 +1516,7 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// next object start and initialize the object.
__ str(R1, Address(R3, 0));
__ AddImmediate(R0, kHeapObjectTag);
+ __ UpdateAllocationStatsWithSize(kOneByteStringCid, R2, R3);
// Initialize the tags.
// R0: new object start as a tagged pointer.
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698