| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_CLASS_TABLE_H_ | 5 #ifndef VM_CLASS_TABLE_H_ |
| 6 #define VM_CLASS_TABLE_H_ | 6 #define VM_CLASS_TABLE_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 OFFSET_OF(AllocStats<intptr_t>, old_size); | 102 OFFSET_OF(AllocStats<intptr_t>, old_size); |
| 103 } | 103 } |
| 104 | 104 |
| 105 void Initialize(); | 105 void Initialize(); |
| 106 void ResetAtNewGC(); | 106 void ResetAtNewGC(); |
| 107 void ResetAtOldGC(); | 107 void ResetAtOldGC(); |
| 108 void ResetAccumulator(); | 108 void ResetAccumulator(); |
| 109 void UpdatePromotedAfterNewGC(); | 109 void UpdatePromotedAfterNewGC(); |
| 110 void UpdateSize(intptr_t instance_size); | 110 void UpdateSize(intptr_t instance_size); |
| 111 void PrintToJSONObject(const Class& cls, JSONObject* obj) const; | 111 void PrintToJSONObject(const Class& cls, JSONObject* obj) const; |
| 112 void Verify(); |
| 112 | 113 |
| 113 private: | 114 private: |
| 114 // Recent old at start of last new GC (used to compute promoted_*). | 115 // Recent old at start of last new GC (used to compute promoted_*). |
| 115 intptr_t old_pre_new_gc_count_; | 116 intptr_t old_pre_new_gc_count_; |
| 116 intptr_t old_pre_new_gc_size_; | 117 intptr_t old_pre_new_gc_size_; |
| 117 | |
| 118 void Verify(); | |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 | 120 |
| 122 class ClassTable { | 121 class ClassTable { |
| 123 public: | 122 public: |
| 124 ClassTable(); | 123 ClassTable(); |
| 125 // Create a copy of the original class table only, without copying any of the | 124 // Create a copy of the original class table only, without copying any of the |
| 126 // stats data. | 125 // stats data. |
| 127 explicit ClassTable(ClassTable* original); | 126 explicit ClassTable(ClassTable* original); |
| 128 ~ClassTable(); | 127 ~ClassTable(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); | 210 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); |
| 212 void UpdateLiveOld(intptr_t cid, intptr_t size); | 211 void UpdateLiveOld(intptr_t cid, intptr_t size); |
| 213 void UpdateLiveNew(intptr_t cid, intptr_t size); | 212 void UpdateLiveNew(intptr_t cid, intptr_t size); |
| 214 | 213 |
| 215 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 214 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
| 216 }; | 215 }; |
| 217 | 216 |
| 218 } // namespace dart | 217 } // namespace dart |
| 219 | 218 |
| 220 #endif // VM_CLASS_TABLE_H_ | 219 #endif // VM_CLASS_TABLE_H_ |
| OLD | NEW |