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

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

Issue 2375983002: Revert of [heap] New heuristics for starting of incremental marking. (Closed)
Patch Set: 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 }
56 if (!incremental_marking->IsStopped()) { 48 if (!incremental_marking->IsStopped()) {
57 Step(heap); 49 Step(heap);
58 if (!incremental_marking->IsStopped()) { 50 if (!incremental_marking->IsStopped()) {
59 job_->ScheduleTask(heap); 51 job_->ScheduleTask(heap);
60 } 52 }
61 } 53 }
62 } 54 }
63 55
64 } // namespace internal 56 } // namespace internal
65 } // namespace v8 57 } // 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