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

Side by Side Diff: src/heap/heap.cc

Issue 2418803003: [heap] Consider both marking deques when triggering a GC in finalization (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 | « 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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 4184 matching lines...) Expand 10 before | Expand all | Expand 10 after
4195 embedder_heap_tracer()->NumberOfWrappersToTrace() == 0)); 4195 embedder_heap_tracer()->NumberOfWrappersToTrace() == 0));
4196 } 4196 }
4197 4197
4198 void Heap::FinalizeIncrementalMarkingIfComplete( 4198 void Heap::FinalizeIncrementalMarkingIfComplete(
4199 GarbageCollectionReason gc_reason) { 4199 GarbageCollectionReason gc_reason) {
4200 if (incremental_marking()->IsMarking() && 4200 if (incremental_marking()->IsMarking() &&
4201 (incremental_marking()->IsReadyToOverApproximateWeakClosure() || 4201 (incremental_marking()->IsReadyToOverApproximateWeakClosure() ||
4202 (!incremental_marking()->finalize_marking_completed() && 4202 (!incremental_marking()->finalize_marking_completed() &&
4203 MarkingDequesAreEmpty()))) { 4203 MarkingDequesAreEmpty()))) {
4204 FinalizeIncrementalMarking(gc_reason); 4204 FinalizeIncrementalMarking(gc_reason);
4205 } else if (incremental_marking()->IsComplete() || 4205 } else if (incremental_marking()->IsComplete() || MarkingDequesAreEmpty()) {
4206 (mark_compact_collector()->marking_deque()->IsEmpty())) {
4207 CollectAllGarbage(current_gc_flags_, gc_reason); 4206 CollectAllGarbage(current_gc_flags_, gc_reason);
4208 } 4207 }
4209 } 4208 }
4210 4209
4211 bool Heap::TryFinalizeIdleIncrementalMarking( 4210 bool Heap::TryFinalizeIdleIncrementalMarking(
4212 double idle_time_in_ms, GarbageCollectionReason gc_reason) { 4211 double idle_time_in_ms, GarbageCollectionReason gc_reason) {
4213 size_t size_of_objects = static_cast<size_t>(SizeOfObjects()); 4212 size_t size_of_objects = static_cast<size_t>(SizeOfObjects());
4214 double final_incremental_mark_compact_speed_in_bytes_per_ms = 4213 double final_incremental_mark_compact_speed_in_bytes_per_ms =
4215 tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond(); 4214 tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond();
4216 if (incremental_marking()->IsReadyToOverApproximateWeakClosure() || 4215 if (incremental_marking()->IsReadyToOverApproximateWeakClosure() ||
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after
6504 } 6503 }
6505 6504
6506 6505
6507 // static 6506 // static
6508 int Heap::GetStaticVisitorIdForMap(Map* map) { 6507 int Heap::GetStaticVisitorIdForMap(Map* map) {
6509 return StaticVisitorBase::GetVisitorId(map); 6508 return StaticVisitorBase::GetVisitorId(map);
6510 } 6509 }
6511 6510
6512 } // namespace internal 6511 } // namespace internal
6513 } // namespace v8 6512 } // 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