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

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: Fix compilation 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') | 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 <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 template <RememberedSetType type>
331 void UpdatePointersInParallel(Heap* heap, base::Semaphore* semaphore,
332 const MarkCompactCollectorBase* collector);
333
334 int NumberOfParallelCompactionTasks(int pages);
335 int NumberOfPointerUpdateTasks(int pages);
336
330 Heap* heap_; 337 Heap* heap_;
331 }; 338 };
332 339
333 // Collector for young-generation only. 340 // Collector for young-generation only.
334 class MinorMarkCompactCollector final : public MarkCompactCollectorBase { 341 class MinorMarkCompactCollector final : public MarkCompactCollectorBase {
335 public: 342 public:
336 explicit MinorMarkCompactCollector(Heap* heap) 343 explicit MinorMarkCompactCollector(Heap* heap)
337 : MarkCompactCollectorBase(heap), 344 : MarkCompactCollectorBase(heap),
338 marking_deque_(heap), 345 marking_deque_(heap),
339 page_parallel_job_semaphore_(0) {} 346 page_parallel_job_semaphore_(0) {}
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 ~EvacuationScope() { collector_->set_evacuation(false); } 761 ~EvacuationScope() { collector_->set_evacuation(false); }
755 762
756 private: 763 private:
757 MarkCompactCollector* collector_; 764 MarkCompactCollector* collector_;
758 }; 765 };
759 766
760 } // namespace internal 767 } // namespace internal
761 } // namespace v8 768 } // namespace v8
762 769
763 #endif // V8_HEAP_MARK_COMPACT_H_ 770 #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