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 #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" |
(...skipping 5476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5487 | 5487 |
5488 base::CallOnce(&initialize_gc_once, &InitializeGCOnce); | 5488 base::CallOnce(&initialize_gc_once, &InitializeGCOnce); |
5489 | 5489 |
5490 // Set up memory allocator. | 5490 // Set up memory allocator. |
5491 memory_allocator_ = new MemoryAllocator(isolate_); | 5491 memory_allocator_ = new MemoryAllocator(isolate_); |
5492 if (!memory_allocator_->SetUp(MaxReserved(), code_range_size_)) return false; | 5492 if (!memory_allocator_->SetUp(MaxReserved(), code_range_size_)) return false; |
5493 | 5493 |
5494 store_buffer_ = new StoreBuffer(this); | 5494 store_buffer_ = new StoreBuffer(this); |
5495 | 5495 |
5496 incremental_marking_ = new IncrementalMarking(this); | 5496 incremental_marking_ = new IncrementalMarking(this); |
5497 concurrent_marking_ = new ConcurrentMarking(this); | |
5498 | 5497 |
5499 for (int i = 0; i <= LAST_SPACE; i++) { | 5498 for (int i = 0; i <= LAST_SPACE; i++) { |
5500 space_[i] = nullptr; | 5499 space_[i] = nullptr; |
5501 } | 5500 } |
5502 | 5501 |
5503 space_[NEW_SPACE] = new_space_ = new NewSpace(this); | 5502 space_[NEW_SPACE] = new_space_ = new NewSpace(this); |
5504 if (!new_space_->SetUp(initial_semispace_size_, max_semi_space_size_)) { | 5503 if (!new_space_->SetUp(initial_semispace_size_, max_semi_space_size_)) { |
5505 return false; | 5504 return false; |
5506 } | 5505 } |
5507 new_space_top_after_last_gc_ = new_space()->top(); | 5506 new_space_top_after_last_gc_ = new_space()->top(); |
(...skipping 28 matching lines...) Expand all Loading... |
5536 for (int i = 0; i < static_cast<int>(v8::Isolate::kUseCounterFeatureCount); | 5535 for (int i = 0; i < static_cast<int>(v8::Isolate::kUseCounterFeatureCount); |
5537 i++) { | 5536 i++) { |
5538 deferred_counters_[i] = 0; | 5537 deferred_counters_[i] = 0; |
5539 } | 5538 } |
5540 | 5539 |
5541 tracer_ = new GCTracer(this); | 5540 tracer_ = new GCTracer(this); |
5542 scavenge_collector_ = new Scavenger(this); | 5541 scavenge_collector_ = new Scavenger(this); |
5543 mark_compact_collector_ = new MarkCompactCollector(this); | 5542 mark_compact_collector_ = new MarkCompactCollector(this); |
5544 incremental_marking_->set_marking_deque( | 5543 incremental_marking_->set_marking_deque( |
5545 mark_compact_collector_->marking_deque()); | 5544 mark_compact_collector_->marking_deque()); |
| 5545 concurrent_marking_ = |
| 5546 new ConcurrentMarking(this, mark_compact_collector_->marking_deque()); |
5546 if (FLAG_minor_mc) | 5547 if (FLAG_minor_mc) |
5547 minor_mark_compact_collector_ = new MinorMarkCompactCollector(this); | 5548 minor_mark_compact_collector_ = new MinorMarkCompactCollector(this); |
5548 gc_idle_time_handler_ = new GCIdleTimeHandler(); | 5549 gc_idle_time_handler_ = new GCIdleTimeHandler(); |
5549 memory_reducer_ = new MemoryReducer(this); | 5550 memory_reducer_ = new MemoryReducer(this); |
5550 if (V8_UNLIKELY(FLAG_gc_stats)) { | 5551 if (V8_UNLIKELY(FLAG_gc_stats)) { |
5551 live_object_stats_ = new ObjectStats(this); | 5552 live_object_stats_ = new ObjectStats(this); |
5552 dead_object_stats_ = new ObjectStats(this); | 5553 dead_object_stats_ = new ObjectStats(this); |
5553 } | 5554 } |
5554 scavenge_job_ = new ScavengeJob(); | 5555 scavenge_job_ = new ScavengeJob(); |
5555 local_embedder_heap_tracer_ = new LocalEmbedderHeapTracer(); | 5556 local_embedder_heap_tracer_ = new LocalEmbedderHeapTracer(); |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6415 case LO_SPACE: | 6416 case LO_SPACE: |
6416 return "LO_SPACE"; | 6417 return "LO_SPACE"; |
6417 default: | 6418 default: |
6418 UNREACHABLE(); | 6419 UNREACHABLE(); |
6419 } | 6420 } |
6420 return NULL; | 6421 return NULL; |
6421 } | 6422 } |
6422 | 6423 |
6423 } // namespace internal | 6424 } // namespace internal |
6424 } // namespace v8 | 6425 } // namespace v8 |
OLD | NEW |