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

Unified Diff: src/heap/heap.cc

Issue 2851743002: [heap] Remove TryFinalizeIdleIncrementalMarking. (Closed)
Patch Set: fix call-site Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c06de070e0dadd6410a8aacb50de7c614e7dc72e..15578f51bcfaf583bc09dc3809d85d1df19ab04d 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4230,32 +4230,6 @@ void Heap::FinalizeIncrementalMarkingIfComplete(
}
}
-bool Heap::TryFinalizeIdleIncrementalMarking(
- double idle_time_in_ms, GarbageCollectionReason gc_reason) {
- size_t size_of_objects = static_cast<size_t>(SizeOfObjects());
- double final_incremental_mark_compact_speed_in_bytes_per_ms =
- tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond();
- if (incremental_marking()->IsReadyToOverApproximateWeakClosure() ||
- (!incremental_marking()->finalize_marking_completed() &&
- mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()->ShouldFinalizeIncrementalMarking() &&
- gc_idle_time_handler_->ShouldDoOverApproximateWeakClosure(
- idle_time_in_ms))) {
- FinalizeIncrementalMarking(gc_reason);
- return true;
- } else if (incremental_marking()->IsComplete() ||
- (mark_compact_collector()->marking_deque()->IsEmpty() &&
- local_embedder_heap_tracer()
- ->ShouldFinalizeIncrementalMarking() &&
- gc_idle_time_handler_->ShouldDoFinalIncrementalMarkCompact(
- idle_time_in_ms, size_of_objects,
- final_incremental_mark_compact_speed_in_bytes_per_ms))) {
- CollectAllGarbage(current_gc_flags_, gc_reason);
- return true;
- }
- return false;
-}
-
void Heap::RegisterReservationsForBlackAllocation(Reservation* reservations) {
// TODO(hpayer): We do not have to iterate reservations on black objects
// for marking. We just have to execute the special visiting side effect
@@ -4332,8 +4306,7 @@ bool Heap::PerformIdleTimeAction(GCIdleTimeAction action,
deadline_in_ms, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
IncrementalMarking::FORCE_COMPLETION, StepOrigin::kTask);
if (remaining_idle_time_in_ms > 0.0) {
- TryFinalizeIdleIncrementalMarking(
- remaining_idle_time_in_ms,
+ FinalizeIncrementalMarkingIfComplete(
GarbageCollectionReason::kFinalizeMarkingViaTask);
}
result = incremental_marking()->IsStopped();
« no previous file with comments | « src/heap/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698