| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
| 6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 | 10 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 517 |
| 518 explicit MarkCompactCollector(Heap* heap); | 518 explicit MarkCompactCollector(Heap* heap); |
| 519 ~MarkCompactCollector(); | 519 ~MarkCompactCollector(); |
| 520 | 520 |
| 521 bool WillBeDeoptimized(Code* code); | 521 bool WillBeDeoptimized(Code* code); |
| 522 void EvictPopularEvacuationCandidate(Page* page); | 522 void EvictPopularEvacuationCandidate(Page* page); |
| 523 void ClearInvalidStoreAndSlotsBufferEntries(); | 523 void ClearInvalidStoreAndSlotsBufferEntries(); |
| 524 | 524 |
| 525 void StartSweeperThreads(); | 525 void StartSweeperThreads(); |
| 526 | 526 |
| 527 void ComputeEvacuationHeuristics(int area_size, |
| 528 int* target_fragmentation_percent, |
| 529 int* max_evacuated_bytes); |
| 530 |
| 527 #ifdef DEBUG | 531 #ifdef DEBUG |
| 528 enum CollectorState { | 532 enum CollectorState { |
| 529 IDLE, | 533 IDLE, |
| 530 PREPARE_GC, | 534 PREPARE_GC, |
| 531 MARK_LIVE_OBJECTS, | 535 MARK_LIVE_OBJECTS, |
| 532 SWEEP_SPACES, | 536 SWEEP_SPACES, |
| 533 ENCODE_FORWARDING_ADDRESSES, | 537 ENCODE_FORWARDING_ADDRESSES, |
| 534 UPDATE_POINTERS, | 538 UPDATE_POINTERS, |
| 535 RELOCATE_OBJECTS | 539 RELOCATE_OBJECTS |
| 536 }; | 540 }; |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 private: | 865 private: |
| 862 MarkCompactCollector* collector_; | 866 MarkCompactCollector* collector_; |
| 863 }; | 867 }; |
| 864 | 868 |
| 865 | 869 |
| 866 const char* AllocationSpaceName(AllocationSpace space); | 870 const char* AllocationSpaceName(AllocationSpace space); |
| 867 } // namespace internal | 871 } // namespace internal |
| 868 } // namespace v8 | 872 } // namespace v8 |
| 869 | 873 |
| 870 #endif // V8_HEAP_MARK_COMPACT_H_ | 874 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |