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

Side by Side Diff: src/heap/heap.cc

Issue 2810893002: [heap] Implement simple concurrent marking deque. (Closed)
Patch Set: revert flags 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
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 #include "src/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
11 #include "src/base/bits.h" 11 #include "src/base/bits.h"
12 #include "src/base/once.h" 12 #include "src/base/once.h"
13 #include "src/base/utils/random-number-generator.h" 13 #include "src/base/utils/random-number-generator.h"
14 #include "src/bootstrapper.h" 14 #include "src/bootstrapper.h"
15 #include "src/codegen.h" 15 #include "src/codegen.h"
16 #include "src/compilation-cache.h" 16 #include "src/compilation-cache.h"
17 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" 17 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
18 #include "src/conversions.h" 18 #include "src/conversions.h"
19 #include "src/debug/debug.h" 19 #include "src/debug/debug.h"
20 #include "src/deoptimizer.h" 20 #include "src/deoptimizer.h"
21 #include "src/feedback-vector.h" 21 #include "src/feedback-vector.h"
22 #include "src/global-handles.h" 22 #include "src/global-handles.h"
23 #include "src/heap/array-buffer-tracker-inl.h" 23 #include "src/heap/array-buffer-tracker-inl.h"
24 #include "src/heap/code-stats.h" 24 #include "src/heap/code-stats.h"
25 #include "src/heap/concurrent-marking-deque.h"
25 #include "src/heap/concurrent-marking.h" 26 #include "src/heap/concurrent-marking.h"
26 #include "src/heap/embedder-tracing.h" 27 #include "src/heap/embedder-tracing.h"
27 #include "src/heap/gc-idle-time-handler.h" 28 #include "src/heap/gc-idle-time-handler.h"
28 #include "src/heap/gc-tracer.h" 29 #include "src/heap/gc-tracer.h"
29 #include "src/heap/incremental-marking.h" 30 #include "src/heap/incremental-marking.h"
30 #include "src/heap/mark-compact-inl.h" 31 #include "src/heap/mark-compact-inl.h"
31 #include "src/heap/mark-compact.h" 32 #include "src/heap/mark-compact.h"
32 #include "src/heap/memory-reducer.h" 33 #include "src/heap/memory-reducer.h"
33 #include "src/heap/object-stats.h" 34 #include "src/heap/object-stats.h"
34 #include "src/heap/objects-visiting-inl.h" 35 #include "src/heap/objects-visiting-inl.h"
(...skipping 5476 matching lines...) Expand 10 before | Expand all | Expand 10 after
5511 // Set up memory allocator. 5512 // Set up memory allocator.
5512 memory_allocator_ = new MemoryAllocator(isolate_); 5513 memory_allocator_ = new MemoryAllocator(isolate_);
5513 if (!memory_allocator_->SetUp(MaxReserved(), MaxExecutableSize(), 5514 if (!memory_allocator_->SetUp(MaxReserved(), MaxExecutableSize(),
5514 code_range_size_)) 5515 code_range_size_))
5515 return false; 5516 return false;
5516 5517
5517 store_buffer_ = new StoreBuffer(this); 5518 store_buffer_ = new StoreBuffer(this);
5518 5519
5519 incremental_marking_ = new IncrementalMarking(this); 5520 incremental_marking_ = new IncrementalMarking(this);
5520 5521
5521 concurrent_marking_ = new ConcurrentMarking(this);
5522 5522
5523 for (int i = 0; i <= LAST_SPACE; i++) { 5523 for (int i = 0; i <= LAST_SPACE; i++) {
5524 space_[i] = nullptr; 5524 space_[i] = nullptr;
5525 } 5525 }
5526 5526
5527 space_[NEW_SPACE] = new_space_ = new NewSpace(this); 5527 space_[NEW_SPACE] = new_space_ = new NewSpace(this);
5528 if (!new_space_->SetUp(initial_semispace_size_, max_semi_space_size_)) { 5528 if (!new_space_->SetUp(initial_semispace_size_, max_semi_space_size_)) {
5529 return false; 5529 return false;
5530 } 5530 }
5531 new_space_top_after_last_gc_ = new_space()->top(); 5531 new_space_top_after_last_gc_ = new_space()->top();
(...skipping 26 matching lines...) Expand all
5558 } 5558 }
5559 5559
5560 for (int i = 0; i < static_cast<int>(v8::Isolate::kUseCounterFeatureCount); 5560 for (int i = 0; i < static_cast<int>(v8::Isolate::kUseCounterFeatureCount);
5561 i++) { 5561 i++) {
5562 deferred_counters_[i] = 0; 5562 deferred_counters_[i] = 0;
5563 } 5563 }
5564 5564
5565 tracer_ = new GCTracer(this); 5565 tracer_ = new GCTracer(this);
5566 scavenge_collector_ = new Scavenger(this); 5566 scavenge_collector_ = new Scavenger(this);
5567 mark_compact_collector_ = new MarkCompactCollector(this); 5567 mark_compact_collector_ = new MarkCompactCollector(this);
5568 concurrent_marking_ =
5569 new ConcurrentMarking(this, mark_compact_collector_->marking_deque());
5568 if (FLAG_minor_mc) 5570 if (FLAG_minor_mc)
5569 minor_mark_compact_collector_ = new MinorMarkCompactCollector(this); 5571 minor_mark_compact_collector_ = new MinorMarkCompactCollector(this);
5570 gc_idle_time_handler_ = new GCIdleTimeHandler(); 5572 gc_idle_time_handler_ = new GCIdleTimeHandler();
5571 memory_reducer_ = new MemoryReducer(this); 5573 memory_reducer_ = new MemoryReducer(this);
5572 if (V8_UNLIKELY(FLAG_gc_stats)) { 5574 if (V8_UNLIKELY(FLAG_gc_stats)) {
5573 live_object_stats_ = new ObjectStats(this); 5575 live_object_stats_ = new ObjectStats(this);
5574 dead_object_stats_ = new ObjectStats(this); 5576 dead_object_stats_ = new ObjectStats(this);
5575 } 5577 }
5576 scavenge_job_ = new ScavengeJob(); 5578 scavenge_job_ = new ScavengeJob();
5577 local_embedder_heap_tracer_ = new LocalEmbedderHeapTracer(); 5579 local_embedder_heap_tracer_ = new LocalEmbedderHeapTracer();
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
6434 case LO_SPACE: 6436 case LO_SPACE:
6435 return "LO_SPACE"; 6437 return "LO_SPACE";
6436 default: 6438 default:
6437 UNREACHABLE(); 6439 UNREACHABLE();
6438 } 6440 }
6439 return NULL; 6441 return NULL;
6440 } 6442 }
6441 6443
6442 } // namespace internal 6444 } // namespace internal
6443 } // namespace v8 6445 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698