Chromium Code Reviews| 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; |