Chromium Code Reviews| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 299 // Visit all objects, including FreeListElement "objects". Caller must ensure | 299 // Visit all objects, including FreeListElement "objects". Caller must ensure |
| 300 // concurrent sweeper is not running, and the visitor must not allocate. | 300 // concurrent sweeper is not running, and the visitor must not allocate. |
| 301 void VisitObjects(ObjectVisitor* visitor) const; | 301 void VisitObjects(ObjectVisitor* visitor) const; |
| 302 void VisitObjectsNoImagePages(ObjectVisitor* visitor) const; | 302 void VisitObjectsNoImagePages(ObjectVisitor* visitor) const; |
| 303 void VisitObjectsImagePages(ObjectVisitor* visitor) const; | 303 void VisitObjectsImagePages(ObjectVisitor* visitor) const; |
| 304 | 304 |
| 305 // Like Verify, but does not wait for concurrent sweeper, so caller must | 305 // Like Verify, but does not wait for concurrent sweeper, so caller must |
| 306 // ensure thread-safety. | 306 // ensure thread-safety. |
| 307 bool VerifyGC(MarkExpectation mark_expectation = kForbidMarked) const; | 307 bool VerifyGC(MarkExpectation mark_expectation = kForbidMarked) const; |
| 308 | 308 |
| 309 void EvacuateNewSpaceGarbage(Thread* thread, GCReason reason); | |
|
rmacnak
2017/06/30 22:24:56
Consider just "EvacuateNewSpace", since the garbag
danunez
2017/06/30 22:33:58
Done.
| |
| 309 // Helper functions for garbage collection. | 310 // Helper functions for garbage collection. |
| 310 void CollectNewSpaceGarbage(Thread* thread, | 311 void CollectNewSpaceGarbage(Thread* thread, |
| 311 ApiCallbacks api_callbacks, | 312 ApiCallbacks api_callbacks, |
| 312 GCReason reason); | 313 GCReason reason); |
| 313 void CollectOldSpaceGarbage(Thread* thread, | 314 void CollectOldSpaceGarbage(Thread* thread, |
| 314 ApiCallbacks api_callbacks, | 315 ApiCallbacks api_callbacks, |
| 315 GCReason reason); | 316 GCReason reason); |
| 316 | 317 |
| 317 // GC stats collection. | 318 // GC stats collection. |
| 318 void RecordBeforeGC(Space space, GCReason reason); | 319 void RecordBeforeGC(Space space, GCReason reason); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 // Note: During this scope, the code pages are non-executable. | 394 // Note: During this scope, the code pages are non-executable. |
| 394 class WritableVMIsolateScope : StackResource { | 395 class WritableVMIsolateScope : StackResource { |
| 395 public: | 396 public: |
| 396 explicit WritableVMIsolateScope(Thread* thread); | 397 explicit WritableVMIsolateScope(Thread* thread); |
| 397 ~WritableVMIsolateScope(); | 398 ~WritableVMIsolateScope(); |
| 398 }; | 399 }; |
| 399 | 400 |
| 400 } // namespace dart | 401 } // namespace dart |
| 401 | 402 |
| 402 #endif // RUNTIME_VM_HEAP_H_ | 403 #endif // RUNTIME_VM_HEAP_H_ |
| OLD | NEW |