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

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

Issue 1419393002: Force incremental marking steps in incremental-marking-job only if (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 if (V8::GetCurrentPlatform()->IdleTasksEnabled(isolate)) { 46 if (V8::GetCurrentPlatform()->IdleTasksEnabled(isolate)) {
47 idle_task_pending_ = true; 47 idle_task_pending_ = true;
48 auto task = new IdleTask(heap->isolate(), this); 48 auto task = new IdleTask(heap->isolate(), this);
49 V8::GetCurrentPlatform()->CallIdleOnForegroundThread(isolate, task); 49 V8::GetCurrentPlatform()->CallIdleOnForegroundThread(isolate, task);
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 54
55 void IncrementalMarkingJob::ScheduleDelayedTask(Heap* heap) { 55 void IncrementalMarkingJob::ScheduleDelayedTask(Heap* heap) {
56 if (!delayed_task_pending_) { 56 if (!delayed_task_pending_ && FLAG_memory_reducer) {
57 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(heap->isolate()); 57 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(heap->isolate());
58 delayed_task_pending_ = true; 58 delayed_task_pending_ = true;
59 made_progress_since_last_delayed_task_ = false; 59 made_progress_since_last_delayed_task_ = false;
60 auto task = new DelayedTask(heap->isolate(), this); 60 auto task = new DelayedTask(heap->isolate(), this);
61 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread(isolate, task, 61 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread(isolate, task,
62 kDelayInSeconds); 62 kDelayInSeconds);
63 } 63 }
64 } 64 }
65 65
66 66
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 // The Step() above could have finished incremental marking. 137 // The Step() above could have finished incremental marking.
138 if (!incremental_marking->IsStopped()) { 138 if (!incremental_marking->IsStopped()) {
139 job_->ScheduleDelayedTask(heap); 139 job_->ScheduleDelayedTask(heap);
140 } 140 }
141 } 141 }
142 } 142 }
143 143
144 } // namespace internal 144 } // namespace internal
145 } // namespace v8 145 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698