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

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

Issue 2872063003: [heap] Bound number of tasks by embedder limit instead of artificially capping (Closed)
Patch Set: Created 3 years, 7 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') | src/heap/mark-compact.cc » ('J')
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 <deque> 8 #include <deque>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 template <class Evacuator, class Collector> 320 template <class Evacuator, class Collector>
321 void CreateAndExecuteEvacuationTasks( 321 void CreateAndExecuteEvacuationTasks(
322 Collector* collector, PageParallelJob<EvacuationJobTraits>* job, 322 Collector* collector, PageParallelJob<EvacuationJobTraits>* job,
323 RecordMigratedSlotVisitor* record_visitor, 323 RecordMigratedSlotVisitor* record_visitor,
324 MigrationObserver* migration_observer, const intptr_t live_bytes, 324 MigrationObserver* migration_observer, const intptr_t live_bytes,
325 const int& abandoned_pages); 325 const int& abandoned_pages);
326 326
327 // Returns whether this page should be moved according to heuristics. 327 // Returns whether this page should be moved according to heuristics.
328 bool ShouldMovePage(Page* p, intptr_t live_bytes); 328 bool ShouldMovePage(Page* p, intptr_t live_bytes);
329 329
330 int NumberOfParallelCompactionTasks(int pages);
331 int NumberOfPointerUpdateTasks(int pages);
332
330 Heap* heap_; 333 Heap* heap_;
331 }; 334 };
332 335
333 // Collector for young-generation only. 336 // Collector for young-generation only.
334 class MinorMarkCompactCollector final : public MarkCompactCollectorBase { 337 class MinorMarkCompactCollector final : public MarkCompactCollectorBase {
335 public: 338 public:
336 explicit MinorMarkCompactCollector(Heap* heap) 339 explicit MinorMarkCompactCollector(Heap* heap)
337 : MarkCompactCollectorBase(heap), 340 : MarkCompactCollectorBase(heap),
338 marking_deque_(heap), 341 marking_deque_(heap),
339 page_parallel_job_semaphore_(0) {} 342 page_parallel_job_semaphore_(0) {}
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 ~EvacuationScope() { collector_->set_evacuation(false); } 757 ~EvacuationScope() { collector_->set_evacuation(false); }
755 758
756 private: 759 private:
757 MarkCompactCollector* collector_; 760 MarkCompactCollector* collector_;
758 }; 761 };
759 762
760 } // namespace internal 763 } // namespace internal
761 } // namespace v8 764 } // namespace v8
762 765
763 #endif // V8_HEAP_MARK_COMPACT_H_ 766 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | src/heap/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698