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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 uword PredefinedClassHeapStatsTableAddress() { | 151 uword PredefinedClassHeapStatsTableAddress() { |
152 return reinterpret_cast<uword>(predefined_class_heap_stats_table_); | 152 return reinterpret_cast<uword>(predefined_class_heap_stats_table_); |
153 } | 153 } |
154 | 154 |
155 // Used by generated code. | 155 // Used by generated code. |
156 uword ClassStatsTableAddress() { | 156 uword ClassStatsTableAddress() { |
157 return reinterpret_cast<uword>(&class_heap_stats_table_); | 157 return reinterpret_cast<uword>(&class_heap_stats_table_); |
158 } | 158 } |
159 | 159 |
160 | 160 |
161 void AllocationProfilePrintToJSONStream(JSONStream* stream); | 161 void AllocationProfilePrintJSON(JSONStream* stream); |
162 void ResetAllocationAccumulators(); | 162 void ResetAllocationAccumulators(); |
163 | 163 |
164 private: | 164 private: |
165 friend class MarkingVisitor; | 165 friend class MarkingVisitor; |
166 friend class ScavengerVisitor; | 166 friend class ScavengerVisitor; |
167 friend class ClassHeapStatsTestHelper; | 167 friend class ClassHeapStatsTestHelper; |
168 static const int initial_capacity_ = 512; | 168 static const int initial_capacity_ = 512; |
169 static const int capacity_increment_ = 256; | 169 static const int capacity_increment_ = 256; |
170 | 170 |
171 static bool ShouldUpdateSizeForClassId(intptr_t cid); | 171 static bool ShouldUpdateSizeForClassId(intptr_t cid); |
172 | 172 |
173 intptr_t top_; | 173 intptr_t top_; |
174 intptr_t capacity_; | 174 intptr_t capacity_; |
175 | 175 |
176 RawClass** table_; | 176 RawClass** table_; |
177 ClassHeapStats* class_heap_stats_table_; | 177 ClassHeapStats* class_heap_stats_table_; |
178 | 178 |
179 ClassHeapStats* predefined_class_heap_stats_table_; | 179 ClassHeapStats* predefined_class_heap_stats_table_; |
180 | 180 |
181 ClassHeapStats* StatsAt(intptr_t cid); | 181 ClassHeapStats* StatsAt(intptr_t cid); |
182 void UpdateLiveOld(intptr_t cid, intptr_t size); | 182 void UpdateLiveOld(intptr_t cid, intptr_t size); |
183 void UpdateLiveNew(intptr_t cid, intptr_t size); | 183 void UpdateLiveNew(intptr_t cid, intptr_t size); |
184 | 184 |
185 DISALLOW_COPY_AND_ASSIGN(ClassTable); | 185 DISALLOW_COPY_AND_ASSIGN(ClassTable); |
186 }; | 186 }; |
187 | 187 |
188 } // namespace dart | 188 } // namespace dart |
189 | 189 |
190 #endif // VM_CLASS_TABLE_H_ | 190 #endif // VM_CLASS_TABLE_H_ |
OLD | NEW |