Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: src/heap/mark-compact.h

Issue 1347873003: Revert of [heap] Introduce parallel compaction algorithm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@counters-2nd-try
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 // True if concurrent or parallel sweeping is currently in progress. 547 // True if concurrent or parallel sweeping is currently in progress.
548 bool sweeping_in_progress_; 548 bool sweeping_in_progress_;
549 549
550 // True if parallel compaction is currently in progress. 550 // True if parallel compaction is currently in progress.
551 bool parallel_compaction_in_progress_; 551 bool parallel_compaction_in_progress_;
552 552
553 // Synchronize sweeper threads. 553 // Synchronize sweeper threads.
554 base::Semaphore pending_sweeper_jobs_semaphore_; 554 base::Semaphore pending_sweeper_jobs_semaphore_;
555 555
556 // Synchronize compaction tasks. 556 // Synchronize compaction threads.
557 base::Semaphore pending_compaction_tasks_semaphore_; 557 base::Semaphore pending_compaction_jobs_semaphore_;
558
559 // Number of active compaction tasks (including main thread).
560 intptr_t concurrent_compaction_tasks_active_;
561 558
562 bool evacuation_; 559 bool evacuation_;
563 560
564 SlotsBufferAllocator* slots_buffer_allocator_; 561 SlotsBufferAllocator* slots_buffer_allocator_;
565 562
566 SlotsBuffer* migration_slots_buffer_; 563 SlotsBuffer* migration_slots_buffer_;
567 564
568 base::Mutex migration_slots_buffer_mutex_; 565 base::Mutex migration_slots_buffer_mutex_;
569 566
570 // Finishes GC, performs heap verification if enabled. 567 // Finishes GC, performs heap verification if enabled.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // If we are not compacting the heap, we simply sweep the spaces except 705 // If we are not compacting the heap, we simply sweep the spaces except
709 // for the large object space, clearing mark bits and adding unmarked 706 // for the large object space, clearing mark bits and adding unmarked
710 // regions to each space's free list. 707 // regions to each space's free list.
711 void SweepSpaces(); 708 void SweepSpaces();
712 709
713 int DiscoverAndEvacuateBlackObjectsOnPage(NewSpace* new_space, 710 int DiscoverAndEvacuateBlackObjectsOnPage(NewSpace* new_space,
714 NewSpacePage* p); 711 NewSpacePage* p);
715 712
716 void EvacuateNewSpace(); 713 void EvacuateNewSpace();
717 714
718 bool EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space); 715 void EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space);
719 716
720 void EvacuatePages(CompactionSpaceCollection* compaction_spaces); 717 void EvacuatePages();
718
721 void EvacuatePagesInParallel(); 719 void EvacuatePagesInParallel();
722 720
723 int NumberOfParallelCompactionTasks() {
724 // TODO(hpayer, mlippautz): Figure out some logic to determine the number
725 // of compaction tasks.
726 return 1;
727 }
728
729 void WaitUntilCompactionCompleted(); 721 void WaitUntilCompactionCompleted();
730 722
731 void EvacuateNewSpaceAndCandidates(); 723 void EvacuateNewSpaceAndCandidates();
732 724
733 void ReleaseEvacuationCandidates(); 725 void ReleaseEvacuationCandidates();
734 726
735 // Moves the pages of the evacuation_candidates_ list to the end of their 727 // Moves the pages of the evacuation_candidates_ list to the end of their
736 // corresponding space pages list. 728 // corresponding space pages list.
737 void MoveEvacuationCandidatesToEndOfPagesList(); 729 void MoveEvacuationCandidatesToEndOfPagesList();
738 730
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 private: 823 private:
832 MarkCompactCollector* collector_; 824 MarkCompactCollector* collector_;
833 }; 825 };
834 826
835 827
836 const char* AllocationSpaceName(AllocationSpace space); 828 const char* AllocationSpaceName(AllocationSpace space);
837 } 829 }
838 } // namespace v8::internal 830 } // namespace v8::internal
839 831
840 #endif // V8_HEAP_MARK_COMPACT_H_ 832 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698