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

Side by Side Diff: src/heap/memory-reducer.cc

Issue 1844293005: [heap] Remove unused step_size_in_bytes in AdvanceIncrementalMarking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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-job.cc ('k') | test/cctest/heap/test-heap.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/memory-reducer.h" 5 #include "src/heap/memory-reducer.h"
6 6
7 #include "src/flags.h" 7 #include "src/flags.h"
8 #include "src/heap/gc-tracer.h" 8 #include "src/heap/gc-tracer.h"
9 #include "src/heap/heap-inl.h" 9 #include "src/heap/heap-inl.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } else if (state_.action == kWait) { 77 } else if (state_.action == kWait) {
78 if (!heap()->incremental_marking()->IsStopped() && 78 if (!heap()->incremental_marking()->IsStopped() &&
79 heap()->ShouldOptimizeForMemoryUsage()) { 79 heap()->ShouldOptimizeForMemoryUsage()) {
80 // Make progress with pending incremental marking if memory usage has 80 // Make progress with pending incremental marking if memory usage has
81 // higher priority than latency. This is important for background tabs 81 // higher priority than latency. This is important for background tabs
82 // that do not send idle notifications. 82 // that do not send idle notifications.
83 const int kIncrementalMarkingDelayMs = 500; 83 const int kIncrementalMarkingDelayMs = 500;
84 double deadline = heap()->MonotonicallyIncreasingTimeInMs() + 84 double deadline = heap()->MonotonicallyIncreasingTimeInMs() +
85 kIncrementalMarkingDelayMs; 85 kIncrementalMarkingDelayMs;
86 heap()->incremental_marking()->AdvanceIncrementalMarking( 86 heap()->incremental_marking()->AdvanceIncrementalMarking(
87 0, deadline, i::IncrementalMarking::StepActions( 87 deadline, i::IncrementalMarking::StepActions(
88 i::IncrementalMarking::NO_GC_VIA_STACK_GUARD, 88 i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
89 i::IncrementalMarking::FORCE_MARKING, 89 i::IncrementalMarking::FORCE_MARKING,
90 i::IncrementalMarking::FORCE_COMPLETION)); 90 i::IncrementalMarking::FORCE_COMPLETION));
91 heap()->FinalizeIncrementalMarkingIfComplete( 91 heap()->FinalizeIncrementalMarkingIfComplete(
92 "Memory reducer: finalize incremental marking"); 92 "Memory reducer: finalize incremental marking");
93 } 93 }
94 // Re-schedule the timer. 94 // Re-schedule the timer.
95 ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms); 95 ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms);
96 if (FLAG_trace_gc_verbose) { 96 if (FLAG_trace_gc_verbose) {
97 PrintIsolate(heap()->isolate(), "Memory reducer: waiting for %.f ms\n", 97 PrintIsolate(heap()->isolate(), "Memory reducer: waiting for %.f ms\n",
98 state_.next_gc_start_ms - event.time_ms); 98 state_.next_gc_start_ms - event.time_ms);
99 } 99 }
100 } 100 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 auto timer_task = new MemoryReducer::TimerTask(this); 203 auto timer_task = new MemoryReducer::TimerTask(this);
204 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread( 204 V8::GetCurrentPlatform()->CallDelayedOnForegroundThread(
205 isolate, timer_task, (delay_ms + kSlackMs) / 1000.0); 205 isolate, timer_task, (delay_ms + kSlackMs) / 1000.0);
206 } 206 }
207 207
208 208
209 void MemoryReducer::TearDown() { state_ = State(kDone, 0, 0, 0.0); } 209 void MemoryReducer::TearDown() { state_ = State(kDone, 0, 0, 0.0); }
210 210
211 } // namespace internal 211 } // namespace internal
212 } // namespace v8 212 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/incremental-marking-job.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698