| 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_HEAP_H_ | 5 #ifndef VM_HEAP_H_ |
| 6 #define VM_HEAP_H_ | 6 #define 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 | 237 |
| 238 void PrintToJSONObject(Space space, JSONObject* object) const; | 238 void PrintToJSONObject(Space space, JSONObject* object) const; |
| 239 | 239 |
| 240 // The heap map contains the sizes and class ids for the objects in each page. | 240 // The heap map contains the sizes and class ids for the objects in each page. |
| 241 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { | 241 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { |
| 242 return old_space_.PrintHeapMapToJSONStream(isolate, stream); | 242 return old_space_.PrintHeapMapToJSONStream(isolate, stream); |
| 243 } | 243 } |
| 244 | 244 |
| 245 Isolate* isolate() const { return isolate_; } | 245 Isolate* isolate() const { return isolate_; } |
| 246 | 246 |
| 247 Monitor* barrier() const { return barrier_; } |
| 248 Monitor* barrier_done() const { return barrier_done_; } |
| 249 |
| 247 bool ShouldPretenure(intptr_t class_id) const; | 250 bool ShouldPretenure(intptr_t class_id) const; |
| 248 | 251 |
| 249 void SetupExternalPage(void* pointer, uword size, bool is_executable) { | 252 void SetupExternalPage(void* pointer, uword size, bool is_executable) { |
| 250 old_space_.SetupExternalPage(pointer, size, is_executable); | 253 old_space_.SetupExternalPage(pointer, size, is_executable); |
| 251 } | 254 } |
| 252 | 255 |
| 253 private: | 256 private: |
| 254 class GCStats : public ValueObject { | 257 class GCStats : public ValueObject { |
| 255 public: | 258 public: |
| 256 GCStats() {} | 259 GCStats() {} |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 void EndNewSpaceGC(); | 325 void EndNewSpaceGC(); |
| 323 bool BeginOldSpaceGC(Thread* thread); | 326 bool BeginOldSpaceGC(Thread* thread); |
| 324 void EndOldSpaceGC(); | 327 void EndOldSpaceGC(); |
| 325 | 328 |
| 326 // If this heap is non-empty, updates start and end to the smallest range that | 329 // If this heap is non-empty, updates start and end to the smallest range that |
| 327 // contains both the original [start, end) and the [lowest, highest) addresses | 330 // contains both the original [start, end) and the [lowest, highest) addresses |
| 328 // of this heap. | 331 // of this heap. |
| 329 void GetMergedAddressRange(uword* start, uword* end) const; | 332 void GetMergedAddressRange(uword* start, uword* end) const; |
| 330 | 333 |
| 331 Isolate* isolate_; | 334 Isolate* isolate_; |
| 335 Monitor* barrier_; |
| 336 Monitor* barrier_done_; |
| 332 | 337 |
| 333 // The different spaces used for allocation. | 338 // The different spaces used for allocation. |
| 334 Scavenger new_space_; | 339 Scavenger new_space_; |
| 335 PageSpace old_space_; | 340 PageSpace old_space_; |
| 336 | 341 |
| 337 WeakTable* new_weak_tables_[kNumWeakSelectors]; | 342 WeakTable* new_weak_tables_[kNumWeakSelectors]; |
| 338 WeakTable* old_weak_tables_[kNumWeakSelectors]; | 343 WeakTable* old_weak_tables_[kNumWeakSelectors]; |
| 339 | 344 |
| 340 // GC stats collection. | 345 // GC stats collection. |
| 341 GCStats stats_; | 346 GCStats stats_; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); | 389 explicit WritableVMIsolateScope(Thread* thread, bool include_code_pages); |
| 385 ~WritableVMIsolateScope(); | 390 ~WritableVMIsolateScope(); |
| 386 | 391 |
| 387 private: | 392 private: |
| 388 bool include_code_pages_; | 393 bool include_code_pages_; |
| 389 }; | 394 }; |
| 390 | 395 |
| 391 } // namespace dart | 396 } // namespace dart |
| 392 | 397 |
| 393 #endif // VM_HEAP_H_ | 398 #endif // VM_HEAP_H_ |
| OLD | NEW |