| 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/bitfield.h" | 9 #include "vm/bitfield.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 void RegisterAt(intptr_t index, const Class& cls); | 171 void RegisterAt(intptr_t index, const Class& cls); |
| 172 | 172 |
| 173 void VisitObjectPointers(ObjectPointerVisitor* visitor); | 173 void VisitObjectPointers(ObjectPointerVisitor* visitor); |
| 174 | 174 |
| 175 void Validate(); | 175 void Validate(); |
| 176 | 176 |
| 177 void Print(); | 177 void Print(); |
| 178 | 178 |
| 179 void PrintToJSONObject(JSONObject* object); | 179 void PrintToJSONObject(JSONObject* object); |
| 180 | 180 |
| 181 // Used by the generated code. |
| 181 static intptr_t table_offset() { | 182 static intptr_t table_offset() { |
| 182 return OFFSET_OF(ClassTable, table_); | 183 return OFFSET_OF(ClassTable, table_); |
| 183 } | 184 } |
| 184 | 185 |
| 185 // Called whenever a class is allocated in the runtime. | 186 // Called whenever a class is allocated in the runtime. |
| 186 void UpdateAllocatedNew(intptr_t cid, intptr_t size); | 187 void UpdateAllocatedNew(intptr_t cid, intptr_t size); |
| 187 void UpdateAllocatedOld(intptr_t cid, intptr_t size); | 188 void UpdateAllocatedOld(intptr_t cid, intptr_t size); |
| 188 | 189 |
| 189 // Called whenever a old GC occurs. | 190 // Called whenever a old GC occurs. |
| 190 void ResetCountersOld(); | 191 void ResetCountersOld(); |
| 191 // Called whenever a new GC occurs. | 192 // Called whenever a new GC occurs. |
| 192 void ResetCountersNew(); | 193 void ResetCountersNew(); |
| 193 // Called immediately after a new GC. | 194 // Called immediately after a new GC. |
| 194 void UpdatePromoted(); | 195 void UpdatePromoted(); |
| 195 | 196 |
| 196 // Used by the generated code. | 197 // Used by the generated code. |
| 197 uword TableAddress() { | |
| 198 return reinterpret_cast<uword>(&table_); | |
| 199 } | |
| 200 | |
| 201 // Used by the generated code. | |
| 202 uword PredefinedClassHeapStatsTableAddress() { | 198 uword PredefinedClassHeapStatsTableAddress() { |
| 203 return reinterpret_cast<uword>(predefined_class_heap_stats_table_); | 199 return reinterpret_cast<uword>(predefined_class_heap_stats_table_); |
| 204 } | 200 } |
| 205 | 201 |
| 206 // Used by generated code. | 202 // Used by generated code. |
| 207 uword ClassStatsTableAddress() { | 203 uword ClassStatsTableAddress() { |
| 208 return reinterpret_cast<uword>(&class_heap_stats_table_); | 204 return reinterpret_cast<uword>(&class_heap_stats_table_); |
| 209 } | 205 } |
| 210 | 206 |
| 211 ClassHeapStats* StatsWithUpdatedSize(intptr_t cid); | 207 ClassHeapStats* StatsWithUpdatedSize(intptr_t cid); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 242 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); | 238 ClassHeapStats* PreliminaryStatsAt(intptr_t cid); |
| 243 void UpdateLiveOld(intptr_t cid, intptr_t size); | 239 void UpdateLiveOld(intptr_t cid, intptr_t size); |
| 244 void UpdateLiveNew(intptr_t cid, intptr_t size); | 240 void UpdateLiveNew(intptr_t cid, intptr_t size); |
| 245 | 241 |
| 246 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 242 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
| 247 }; | 243 }; |
| 248 | 244 |
| 249 } // namespace dart | 245 } // namespace dart |
| 250 | 246 |
| 251 #endif // VM_CLASS_TABLE_H_ | 247 #endif // VM_CLASS_TABLE_H_ |
| OLD | NEW |