| 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 RUNTIME_VM_HEAP_H_ | 5 #ifndef RUNTIME_VM_HEAP_H_ |
| 6 #define RUNTIME_VM_HEAP_H_ | 6 #define RUNTIME_VM_HEAP_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 if (space == kNew) { | 209 if (space == kNew) { |
| 210 new_weak_tables_[selector] = value; | 210 new_weak_tables_[selector] = value; |
| 211 } else { | 211 } else { |
| 212 ASSERT(space == kOld); | 212 ASSERT(space == kOld); |
| 213 old_weak_tables_[selector] = value; | 213 old_weak_tables_[selector] = value; |
| 214 } | 214 } |
| 215 } | 215 } |
| 216 | 216 |
| 217 // Stats collection. | 217 // Stats collection. |
| 218 void RecordTime(int id, int64_t micros) { | 218 void RecordTime(int id, int64_t micros) { |
| 219 ASSERT((id >= 0) && (id < GCStats::kDataEntries)); | 219 ASSERT((id >= 0) && (id < GCStats::kTimeEntries)); |
| 220 stats_.times_[id] = micros; | 220 stats_.times_[id] = micros; |
| 221 } | 221 } |
| 222 | 222 |
| 223 void RecordData(int id, intptr_t value) { | 223 void RecordData(int id, intptr_t value) { |
| 224 ASSERT((id >= 0) && (id < GCStats::kDataEntries)); | 224 ASSERT((id >= 0) && (id < GCStats::kDataEntries)); |
| 225 stats_.data_[id] = value; | 225 stats_.data_[id] = value; |
| 226 } | 226 } |
| 227 | 227 |
| 228 void UpdateGlobalMaxUsed(); | 228 void UpdateGlobalMaxUsed(); |
| 229 | 229 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 public: | 261 public: |
| 262 Data() {} | 262 Data() {} |
| 263 int64_t micros_; | 263 int64_t micros_; |
| 264 SpaceUsage new_; | 264 SpaceUsage new_; |
| 265 SpaceUsage old_; | 265 SpaceUsage old_; |
| 266 | 266 |
| 267 private: | 267 private: |
| 268 DISALLOW_COPY_AND_ASSIGN(Data); | 268 DISALLOW_COPY_AND_ASSIGN(Data); |
| 269 }; | 269 }; |
| 270 | 270 |
| 271 enum { kTimeEntries = 5 }; |
| 271 enum { kDataEntries = 4 }; | 272 enum { kDataEntries = 4 }; |
| 272 | 273 |
| 273 Data before_; | 274 Data before_; |
| 274 Data after_; | 275 Data after_; |
| 275 int64_t times_[kDataEntries]; | 276 int64_t times_[kTimeEntries]; |
| 276 intptr_t data_[kDataEntries]; | 277 intptr_t data_[kDataEntries]; |
| 277 | 278 |
| 278 private: | 279 private: |
| 279 DISALLOW_COPY_AND_ASSIGN(GCStats); | 280 DISALLOW_COPY_AND_ASSIGN(GCStats); |
| 280 }; | 281 }; |
| 281 | 282 |
| 282 static const intptr_t kNewAllocatableSize = 256 * KB; | 283 static const intptr_t kNewAllocatableSize = 256 * KB; |
| 283 | 284 |
| 284 Heap(Isolate* isolate, | 285 Heap(Isolate* isolate, |
| 285 intptr_t max_new_gen_semi_words, // Max capacity of new semi-space. | 286 intptr_t max_new_gen_semi_words, // Max capacity of new semi-space. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // Note: During this scope, the code pages are non-executable. | 391 // Note: During this scope, the code pages are non-executable. |
| 391 class WritableVMIsolateScope : StackResource { | 392 class WritableVMIsolateScope : StackResource { |
| 392 public: | 393 public: |
| 393 explicit WritableVMIsolateScope(Thread* thread); | 394 explicit WritableVMIsolateScope(Thread* thread); |
| 394 ~WritableVMIsolateScope(); | 395 ~WritableVMIsolateScope(); |
| 395 }; | 396 }; |
| 396 | 397 |
| 397 } // namespace dart | 398 } // namespace dart |
| 398 | 399 |
| 399 #endif // RUNTIME_VM_HEAP_H_ | 400 #endif // RUNTIME_VM_HEAP_H_ |
| OLD | NEW |