Commit 3dc43a75 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Remove unused step_size_in_bytes in AdvanceIncrementalMarking.

BUG=

Review URL: https://codereview.chromium.org/1844293005

Cr-Commit-Position: refs/heads/master@{#35238}
parent 114c109a
...@@ -928,7 +928,7 @@ void Heap::ReportExternalMemoryPressure(const char* gc_reason) { ...@@ -928,7 +928,7 @@ void Heap::ReportExternalMemoryPressure(const char* gc_reason) {
double deadline = MonotonicallyIncreasingTimeInMs() + double deadline = MonotonicallyIncreasingTimeInMs() +
FLAG_external_allocation_limit_incremental_time; FLAG_external_allocation_limit_incremental_time;
incremental_marking()->AdvanceIncrementalMarking( incremental_marking()->AdvanceIncrementalMarking(
0, deadline, deadline,
IncrementalMarking::StepActions(IncrementalMarking::GC_VIA_STACK_GUARD, IncrementalMarking::StepActions(IncrementalMarking::GC_VIA_STACK_GUARD,
IncrementalMarking::FORCE_MARKING, IncrementalMarking::FORCE_MARKING,
IncrementalMarking::FORCE_COMPLETION)); IncrementalMarking::FORCE_COMPLETION));
......
...@@ -83,7 +83,7 @@ IncrementalMarkingJob::IdleTask::Progress IncrementalMarkingJob::IdleTask::Step( ...@@ -83,7 +83,7 @@ IncrementalMarkingJob::IdleTask::Progress IncrementalMarkingJob::IdleTask::Step(
} }
const double remaining_idle_time_in_ms = const double remaining_idle_time_in_ms =
incremental_marking->AdvanceIncrementalMarking( incremental_marking->AdvanceIncrementalMarking(
0, deadline_in_ms, IncrementalMarking::IdleStepActions()); deadline_in_ms, IncrementalMarking::IdleStepActions());
if (remaining_idle_time_in_ms > 0.0) { if (remaining_idle_time_in_ms > 0.0) {
heap->TryFinalizeIdleIncrementalMarking(remaining_idle_time_in_ms); heap->TryFinalizeIdleIncrementalMarking(remaining_idle_time_in_ms);
} }
...@@ -121,10 +121,10 @@ void IncrementalMarkingJob::DelayedTask::Step(Heap* heap) { ...@@ -121,10 +121,10 @@ void IncrementalMarkingJob::DelayedTask::Step(Heap* heap) {
double deadline = double deadline =
heap->MonotonicallyIncreasingTimeInMs() + kIncrementalMarkingDelayMs; heap->MonotonicallyIncreasingTimeInMs() + kIncrementalMarkingDelayMs;
heap->incremental_marking()->AdvanceIncrementalMarking( heap->incremental_marking()->AdvanceIncrementalMarking(
0, deadline, i::IncrementalMarking::StepActions( deadline, i::IncrementalMarking::StepActions(
i::IncrementalMarking::NO_GC_VIA_STACK_GUARD, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
i::IncrementalMarking::FORCE_MARKING, i::IncrementalMarking::FORCE_MARKING,
i::IncrementalMarking::FORCE_COMPLETION)); i::IncrementalMarking::FORCE_COMPLETION));
heap->FinalizeIncrementalMarkingIfComplete( heap->FinalizeIncrementalMarkingIfComplete(
"Incremental marking task: finalize incremental marking"); "Incremental marking task: finalize incremental marking");
} }
......
...@@ -1015,22 +1015,18 @@ void IncrementalMarking::Epilogue() { ...@@ -1015,22 +1015,18 @@ void IncrementalMarking::Epilogue() {
incremental_marking_finalization_rounds_ = 0; incremental_marking_finalization_rounds_ = 0;
} }
double IncrementalMarking::AdvanceIncrementalMarking( double IncrementalMarking::AdvanceIncrementalMarking(
intptr_t step_size_in_bytes, double deadline_in_ms, double deadline_in_ms, IncrementalMarking::StepActions step_actions) {
IncrementalMarking::StepActions step_actions) {
DCHECK(!IsStopped()); DCHECK(!IsStopped());
if (step_size_in_bytes == 0) { intptr_t step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize(
step_size_in_bytes = GCIdleTimeHandler::EstimateMarkingStepSize( GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs,
GCIdleTimeHandler::kIncrementalMarkingStepTimeInMs, heap()
heap() ->tracer()
->tracer() ->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond());
->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond());
}
double remaining_time_in_ms = 0.0; double remaining_time_in_ms = 0.0;
intptr_t bytes_processed = 0; intptr_t bytes_processed = 0;
do { do {
bytes_processed = bytes_processed =
Step(step_size_in_bytes, step_actions.completion_action, Step(step_size_in_bytes, step_actions.completion_action,
......
...@@ -106,13 +106,10 @@ class IncrementalMarking { ...@@ -106,13 +106,10 @@ class IncrementalMarking {
void Epilogue(); void Epilogue();
// Performs incremental marking steps of step_size_in_bytes as long as // Performs incremental marking steps until deadline_in_ms is reached. It
// deadline_in_ms is not reached. step_size_in_bytes can be 0 to compute // returns the remaining time that cannot be used for incremental marking
// an estimate increment. Returns the remaining time that cannot be used // anymore because a single step would exceed the deadline.
// for incremental marking anymore because a single step would exceed the double AdvanceIncrementalMarking(double deadline_in_ms,
// deadline.
double AdvanceIncrementalMarking(intptr_t step_size_in_bytes,
double deadline_in_ms,
StepActions step_actions); StepActions step_actions);
// It's hard to know how much work the incremental marker should do to make // It's hard to know how much work the incremental marker should do to make
......
...@@ -84,10 +84,10 @@ void MemoryReducer::NotifyTimer(const Event& event) { ...@@ -84,10 +84,10 @@ void MemoryReducer::NotifyTimer(const Event& event) {
double deadline = heap()->MonotonicallyIncreasingTimeInMs() + double deadline = heap()->MonotonicallyIncreasingTimeInMs() +
kIncrementalMarkingDelayMs; kIncrementalMarkingDelayMs;
heap()->incremental_marking()->AdvanceIncrementalMarking( heap()->incremental_marking()->AdvanceIncrementalMarking(
0, deadline, i::IncrementalMarking::StepActions( deadline, i::IncrementalMarking::StepActions(
i::IncrementalMarking::NO_GC_VIA_STACK_GUARD, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD,
i::IncrementalMarking::FORCE_MARKING, i::IncrementalMarking::FORCE_MARKING,
i::IncrementalMarking::FORCE_COMPLETION)); i::IncrementalMarking::FORCE_COMPLETION));
heap()->FinalizeIncrementalMarkingIfComplete( heap()->FinalizeIncrementalMarkingIfComplete(
"Memory reducer: finalize incremental marking"); "Memory reducer: finalize incremental marking");
} }
......
...@@ -4644,7 +4644,7 @@ TEST(LargeObjectSlotRecording) { ...@@ -4644,7 +4644,7 @@ TEST(LargeObjectSlotRecording) {
// Start incremental marking to active write barrier. // Start incremental marking to active write barrier.
SimulateIncrementalMarking(heap, false); SimulateIncrementalMarking(heap, false);
heap->incremental_marking()->AdvanceIncrementalMarking( heap->incremental_marking()->AdvanceIncrementalMarking(
10000000, 10000000, IncrementalMarking::IdleStepActions()); 10000000, IncrementalMarking::IdleStepActions());
// Create references from the large object to the object on the evacuation // Create references from the large object to the object on the evacuation
// candidate. // candidate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment