Chromium Code Reviews| Index: runtime/vm/class_table.h |
| =================================================================== |
| --- runtime/vm/class_table.h (revision 39373) |
| +++ runtime/vm/class_table.h (working copy) |
| @@ -74,6 +74,9 @@ |
| AllocStats<int64_t> accumulated; |
| // Snapshot of recent at the time of the last reset. |
| AllocStats<intptr_t> last_reset; |
| + // Promoted from new to old by last new GC. |
| + intptr_t promoted_count; |
| + intptr_t promoted_size; |
|
Cutch
2014/08/20 17:46:57
Is this accumulated over all GCs or just the last
koda
2014/08/20 17:49:27
Just the last (as the comment above states).
|
| static intptr_t allocated_since_gc_new_space_offset() { |
| return OFFSET_OF(ClassHeapStats, recent) + |
| @@ -96,8 +99,14 @@ |
| void ResetAtNewGC(); |
| void ResetAtOldGC(); |
| void ResetAccumulator(); |
| + void UpdatePromotedAfterNewGC(); |
| void UpdateSize(intptr_t instance_size); |
| void PrintToJSONObject(const Class& cls, JSONObject* obj) const; |
| + |
| + private: |
| + // Recent old at start of last new GC (used to compute promoted_*). |
| + intptr_t old_pre_new_gc_count_; |
| + intptr_t old_pre_new_gc_size_; |
| }; |
| @@ -146,6 +155,8 @@ |
| void ResetCountersOld(); |
| // Called whenever a new GC occurs. |
| void ResetCountersNew(); |
| + // Called immediately after a new GC. |
| + void UpdatePromoted(); |
| // Used by the generated code. |
| uword PredefinedClassHeapStatsTableAddress() { |