| 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/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" | 
| 6 | 6 | 
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" | 
| 8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" | 
| 9 #include "src/conversions.h" | 9 #include "src/conversions.h" | 
| 10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" | 
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 535   if (FLAG_trace_incremental_marking) { | 535   if (FLAG_trace_incremental_marking) { | 
| 536     PrintF("[IncrementalMarking] Start marking\n"); | 536     PrintF("[IncrementalMarking] Start marking\n"); | 
| 537   } | 537   } | 
| 538 | 538 | 
| 539   is_compacting_ = !FLAG_never_compact && | 539   is_compacting_ = !FLAG_never_compact && | 
| 540                    heap_->mark_compact_collector()->StartCompaction( | 540                    heap_->mark_compact_collector()->StartCompaction( | 
| 541                        MarkCompactCollector::INCREMENTAL_COMPACTION); | 541                        MarkCompactCollector::INCREMENTAL_COMPACTION); | 
| 542 | 542 | 
| 543   state_ = MARKING; | 543   state_ = MARKING; | 
| 544 | 544 | 
|  | 545   if (heap_->UsingEmbedderHeapTracer()) { | 
|  | 546     heap_->mark_compact_collector()->embedder_heap_tracer()->TracePrologue(); | 
|  | 547   } | 
|  | 548 | 
| 545   RecordWriteStub::Mode mode = is_compacting_ | 549   RecordWriteStub::Mode mode = is_compacting_ | 
| 546                                    ? RecordWriteStub::INCREMENTAL_COMPACTION | 550                                    ? RecordWriteStub::INCREMENTAL_COMPACTION | 
| 547                                    : RecordWriteStub::INCREMENTAL; | 551                                    : RecordWriteStub::INCREMENTAL; | 
| 548 | 552 | 
| 549   PatchIncrementalMarkingRecordWriteStubs(heap_, mode); | 553   PatchIncrementalMarkingRecordWriteStubs(heap_, mode); | 
| 550 | 554 | 
| 551   heap_->mark_compact_collector()->EnsureMarkingDequeIsCommittedAndInitialize( | 555   heap_->mark_compact_collector()->EnsureMarkingDequeIsCommittedAndInitialize( | 
| 552       MarkCompactCollector::kMaxMarkingDequeSize); | 556       MarkCompactCollector::kMaxMarkingDequeSize); | 
| 553 | 557 | 
| 554   ActivateIncrementalWriteBarrier(); | 558   ActivateIncrementalWriteBarrier(); | 
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1250 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1254 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 
| 1251   idle_marking_delay_counter_++; | 1255   idle_marking_delay_counter_++; | 
| 1252 } | 1256 } | 
| 1253 | 1257 | 
| 1254 | 1258 | 
| 1255 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1259 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 
| 1256   idle_marking_delay_counter_ = 0; | 1260   idle_marking_delay_counter_ = 0; | 
| 1257 } | 1261 } | 
| 1258 }  // namespace internal | 1262 }  // namespace internal | 
| 1259 }  // namespace v8 | 1263 }  // namespace v8 | 
| OLD | NEW | 
|---|