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

Unified Diff: runtime/vm/class_table.h

Issue 173013004: Add accumulator to allocation profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
Index: runtime/vm/class_table.h
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index c20e1b70665b6ca71fe444fb99bfffcdacecbddc..fca69d4979c8c96cebd1aa684a5d203ef297bfb0 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -38,6 +38,18 @@ class ClassHeapStats {
intptr_t allocated_size_since_gc_new_space;
intptr_t allocated_size_since_gc_old_space;
+ // Accumulator.
+ int64_t accumulated_post_gc_new_space;
+ int64_t accumulated_post_gc_old_space;
+ int64_t accumulated_post_gc_size_new_space;
+ int64_t accumulated_post_gc_size_old_space;
+
+ // Offset used when zeroing accumulators.
+ intptr_t accumulator_new_space_offset;
+ intptr_t accumulator_old_space_offset;
+ intptr_t accumulator_size_new_space_offset;
+ intptr_t accumulator_size_old_space_offset;
turnidge 2014/02/27 18:29:13 Notes from our offline discussion: struct AllocSt
Cutch 2014/02/27 21:50:33 Done.
+
static intptr_t allocated_since_gc_new_space_offset() {
return OFFSET_OF(ClassHeapStats, allocated_since_gc_new_space);
}
@@ -54,6 +66,7 @@ class ClassHeapStats {
void Initialize();
void ResetAtNewGC();
void ResetAtOldGC();
+ void ResetAccumulator();
void UpdateSize(intptr_t instance_size);
void PrintTOJSONArray(const Class& cls, JSONArray* array);
};
@@ -113,6 +126,7 @@ class ClassTable {
void AllocationProfilePrintToJSONStream(JSONStream* stream);
+ void ResetAllocationAccumulators();
private:
friend class MarkingVisitor;

Powered by Google App Engine
This is Rietveld 408576698