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

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

Issue 2336943003: [heap] Always use the passed-in collector in CollectGarbage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 975
976 EnsureFillerObjectAtTop(); 976 EnsureFillerObjectAtTop();
977 977
978 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { 978 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) {
979 if (FLAG_trace_incremental_marking) { 979 if (FLAG_trace_incremental_marking) {
980 isolate()->PrintWithTimestamp( 980 isolate()->PrintWithTimestamp(
981 "[IncrementalMarking] Scavenge during marking.\n"); 981 "[IncrementalMarking] Scavenge during marking.\n");
982 } 982 }
983 } 983 }
984 984
985 if (collector == MARK_COMPACTOR && !ShouldFinalizeIncrementalMarking() &&
986 !ShouldAbortIncrementalMarking() && !incremental_marking()->IsStopped() &&
987 !incremental_marking()->should_hurry() && FLAG_incremental_marking &&
988 OldGenerationAllocationLimitReached()) {
989 if (!incremental_marking()->IsComplete() &&
990 !mark_compact_collector()->marking_deque_.IsEmpty() &&
991 !FLAG_gc_global) {
992 if (FLAG_trace_incremental_marking) {
993 isolate()->PrintWithTimestamp(
994 "[IncrementalMarking] Delaying MarkSweep.\n");
995 }
996 collector = SCAVENGER;
997 collector_reason = "incremental marking delaying mark-sweep";
998 }
999 }
1000
1001 bool next_gc_likely_to_collect_more = false; 985 bool next_gc_likely_to_collect_more = false;
1002 intptr_t committed_memory_before = 0; 986 intptr_t committed_memory_before = 0;
1003 987
1004 if (collector == MARK_COMPACTOR) { 988 if (collector == MARK_COMPACTOR) {
1005 committed_memory_before = CommittedOldGenerationMemory(); 989 committed_memory_before = CommittedOldGenerationMemory();
1006 } 990 }
1007 991
1008 { 992 {
1009 tracer()->Start(collector, gc_reason, collector_reason); 993 tracer()->Start(collector, gc_reason, collector_reason);
1010 DCHECK(AllowHeapAllocation::IsAllowed()); 994 DCHECK(AllowHeapAllocation::IsAllowed());
(...skipping 5519 matching lines...) Expand 10 before | Expand all | Expand 10 after
6530 } 6514 }
6531 6515
6532 6516
6533 // static 6517 // static
6534 int Heap::GetStaticVisitorIdForMap(Map* map) { 6518 int Heap::GetStaticVisitorIdForMap(Map* map) {
6535 return StaticVisitorBase::GetVisitorId(map); 6519 return StaticVisitorBase::GetVisitorId(map);
6536 } 6520 }
6537 6521
6538 } // namespace internal 6522 } // namespace internal
6539 } // namespace v8 6523 } // 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