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

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

Issue 2723003003: [heap] Do not delay mark-compact by doing scavenge. (Closed)
Patch Set: Created 3 years, 9 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/assembler-inl.h" 9 #include "src/assembler-inl.h"
10 #include "src/ast/context-slot-cache.h" 10 #include "src/ast/context-slot-cache.h"
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 EnsureFillerObjectAtTop(); 983 EnsureFillerObjectAtTop();
984 984
985 if (IsYoungGenerationCollector(collector) && 985 if (IsYoungGenerationCollector(collector) &&
986 !incremental_marking()->IsStopped()) { 986 !incremental_marking()->IsStopped()) {
987 if (FLAG_trace_incremental_marking) { 987 if (FLAG_trace_incremental_marking) {
988 isolate()->PrintWithTimestamp( 988 isolate()->PrintWithTimestamp(
989 "[IncrementalMarking] Scavenge during marking.\n"); 989 "[IncrementalMarking] Scavenge during marking.\n");
990 } 990 }
991 } 991 }
992 992
993 if (collector == MARK_COMPACTOR && FLAG_incremental_marking &&
994 !ShouldFinalizeIncrementalMarking() && !ShouldAbortIncrementalMarking() &&
995 !incremental_marking()->IsStopped() &&
996 !incremental_marking()->should_hurry() &&
997 !incremental_marking()->NeedsFinalization() &&
998 !IsCloseToOutOfMemory(new_space_->Capacity())) {
999 if (!incremental_marking()->IsComplete() &&
1000 !mark_compact_collector()->marking_deque()->IsEmpty() &&
1001 !FLAG_gc_global) {
1002 if (FLAG_trace_incremental_marking) {
1003 isolate()->PrintWithTimestamp(
1004 "[IncrementalMarking] Delaying MarkSweep.\n");
1005 }
1006 collector = YoungGenerationCollector();
1007 collector_reason = "incremental marking delaying mark-sweep";
1008 }
1009 }
1010
1011 bool next_gc_likely_to_collect_more = false; 993 bool next_gc_likely_to_collect_more = false;
1012 size_t committed_memory_before = 0; 994 size_t committed_memory_before = 0;
1013 995
1014 if (collector == MARK_COMPACTOR) { 996 if (collector == MARK_COMPACTOR) {
1015 committed_memory_before = CommittedOldGenerationMemory(); 997 committed_memory_before = CommittedOldGenerationMemory();
1016 } 998 }
1017 999
1018 { 1000 {
1019 tracer()->Start(collector, gc_reason, collector_reason); 1001 tracer()->Start(collector, gc_reason, collector_reason);
1020 DCHECK(AllowHeapAllocation::IsAllowed()); 1002 DCHECK(AllowHeapAllocation::IsAllowed());
(...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after
6401 } 6383 }
6402 6384
6403 6385
6404 // static 6386 // static
6405 int Heap::GetStaticVisitorIdForMap(Map* map) { 6387 int Heap::GetStaticVisitorIdForMap(Map* map) {
6406 return StaticVisitorBase::GetVisitorId(map); 6388 return StaticVisitorBase::GetVisitorId(map);
6407 } 6389 }
6408 6390
6409 } // namespace internal 6391 } // namespace internal
6410 } // namespace v8 6392 } // 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