Chromium Code Reviews| 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_MARK_COMPACT_H_ | 5 #ifndef V8_MARK_COMPACT_H_ |
| 6 #define V8_MARK_COMPACT_H_ | 6 #define V8_MARK_COMPACT_H_ |
| 7 | 7 |
| 8 #include "src/compiler-intrinsics.h" | 8 #include "src/compiler-intrinsics.h" |
| 9 #include "src/spaces.h" | 9 #include "src/spaces.h" |
| 10 | 10 |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 563 static inline bool IsMarked(Object* obj); | 563 static inline bool IsMarked(Object* obj); |
| 564 | 564 |
| 565 inline Heap* heap() const { return heap_; } | 565 inline Heap* heap() const { return heap_; } |
| 566 inline Isolate* isolate() const; | 566 inline Isolate* isolate() const; |
| 567 | 567 |
| 568 CodeFlusher* code_flusher() { return code_flusher_; } | 568 CodeFlusher* code_flusher() { return code_flusher_; } |
| 569 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } | 569 inline bool is_code_flushing_enabled() const { return code_flusher_ != NULL; } |
| 570 void EnableCodeFlushing(bool enable); | 570 void EnableCodeFlushing(bool enable); |
| 571 | 571 |
| 572 enum SweeperType { | 572 enum SweeperType { |
| 573 CONSERVATIVE, | |
| 574 PARALLEL_CONSERVATIVE, | 573 PARALLEL_CONSERVATIVE, |
| 575 CONCURRENT_CONSERVATIVE, | 574 CONCURRENT_CONSERVATIVE, |
| 576 PRECISE | 575 PRECISE |
| 577 }; | 576 }; |
| 578 | 577 |
| 579 enum SweepingParallelism { | 578 enum SweepingParallelism { |
| 580 SWEEP_ON_MAIN_THREAD, | 579 SWEEP_ON_MAIN_THREAD, |
| 581 SWEEP_IN_PARALLEL | 580 SWEEP_IN_PARALLEL |
| 582 }; | 581 }; |
| 583 | 582 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 int SweepInParallel(PagedSpace* space, int required_freed_bytes); | 665 int SweepInParallel(PagedSpace* space, int required_freed_bytes); |
| 667 | 666 |
| 668 void WaitUntilSweepingCompleted(); | 667 void WaitUntilSweepingCompleted(); |
| 669 | 668 |
| 670 bool IsSweepingCompleted(); | 669 bool IsSweepingCompleted(); |
| 671 | 670 |
| 672 void RefillFreeList(PagedSpace* space); | 671 void RefillFreeList(PagedSpace* space); |
| 673 | 672 |
| 674 bool AreSweeperThreadsActivated(); | 673 bool AreSweeperThreadsActivated(); |
| 675 | 674 |
| 676 // If a paged space is passed in, this method checks if the given space is | 675 // Checks if sweeping is in progress right now on any space. |
| 677 // swept concurrently. Otherwise, this method checks if concurrent sweeping | 676 bool sweeping_pending() { return sweeping_pending_; } |
|
Jarin
2014/07/11 07:40:52
Nit: so why is not this called IsSweepingInProgres
Hannes Payer (out of office)
2014/07/11 09:36:13
It is a true getter now. Anyhow, I renamed the var
| |
| 678 // is in progress right now on any space. | |
| 679 bool IsConcurrentSweepingInProgress(PagedSpace* space = NULL); | |
| 680 | 677 |
| 681 void set_sequential_sweeping(bool sequential_sweeping) { | 678 void set_sequential_sweeping(bool sequential_sweeping) { |
| 682 sequential_sweeping_ = sequential_sweeping; | 679 sequential_sweeping_ = sequential_sweeping; |
| 683 } | 680 } |
| 684 | 681 |
| 685 bool sequential_sweeping() const { | 682 bool sequential_sweeping() const { |
| 686 return sequential_sweeping_; | 683 return sequential_sweeping_; |
| 687 } | 684 } |
| 688 | 685 |
| 689 // Mark the global table which maps weak objects to dependent code without | 686 // Mark the global table which maps weak objects to dependent code without |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 985 private: | 982 private: |
| 986 MarkCompactCollector* collector_; | 983 MarkCompactCollector* collector_; |
| 987 }; | 984 }; |
| 988 | 985 |
| 989 | 986 |
| 990 const char* AllocationSpaceName(AllocationSpace space); | 987 const char* AllocationSpaceName(AllocationSpace space); |
| 991 | 988 |
| 992 } } // namespace v8::internal | 989 } } // namespace v8::internal |
| 993 | 990 |
| 994 #endif // V8_MARK_COMPACT_H_ | 991 #endif // V8_MARK_COMPACT_H_ |
| OLD | NEW |