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

Side by Side Diff: src/heap/incremental-marking-job.cc

Issue 2379663002: Reland "[heap] New heuristics for starting of incremental marking. (patchset #9 id:160001 of https:… (Closed)
Patch Set: fix Created 4 years, 2 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 | « src/heap/incremental-marking.cc ('k') | src/heap/spaces.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 #include "src/heap/incremental-marking-job.h" 5 #include "src/heap/incremental-marking-job.h"
6 6
7 #include "src/base/platform/time.h" 7 #include "src/base/platform/time.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/heap/incremental-marking.h" 10 #include "src/heap/incremental-marking.h"
(...skipping 27 matching lines...) Expand all
38 deadline, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD, 38 deadline, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
39 i::IncrementalMarking::FORCE_COMPLETION, i::StepOrigin::kTask); 39 i::IncrementalMarking::FORCE_COMPLETION, i::StepOrigin::kTask);
40 heap->FinalizeIncrementalMarkingIfComplete( 40 heap->FinalizeIncrementalMarkingIfComplete(
41 GarbageCollectionReason::kFinalizeMarkingViaTask); 41 GarbageCollectionReason::kFinalizeMarkingViaTask);
42 } 42 }
43 43
44 void IncrementalMarkingJob::Task::RunInternal() { 44 void IncrementalMarkingJob::Task::RunInternal() {
45 Heap* heap = isolate()->heap(); 45 Heap* heap = isolate()->heap();
46 job_->NotifyTask(); 46 job_->NotifyTask();
47 IncrementalMarking* incremental_marking = heap->incremental_marking(); 47 IncrementalMarking* incremental_marking = heap->incremental_marking();
48 if (incremental_marking->IsStopped()) {
49 if (heap->IncrementalMarkingLimitReached() !=
50 Heap::IncrementalMarkingLimit::kNoLimit) {
51 heap->StartIncrementalMarking(Heap::kNoGCFlags,
52 GarbageCollectionReason::kIdleTask,
53 kNoGCCallbackFlags);
54 }
55 }
48 if (!incremental_marking->IsStopped()) { 56 if (!incremental_marking->IsStopped()) {
49 Step(heap); 57 Step(heap);
50 if (!incremental_marking->IsStopped()) { 58 if (!incremental_marking->IsStopped()) {
51 job_->ScheduleTask(heap); 59 job_->ScheduleTask(heap);
52 } 60 }
53 } 61 }
54 } 62 }
55 63
56 } // namespace internal 64 } // namespace internal
57 } // namespace v8 65 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698