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

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

Issue 1082973003: Force full GC whenever CollectAllGarbage is meant to trigger a full GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | 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/v8.h" 5 #include "src/v8.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 819
820 EnsureFillerObjectAtTop(); 820 EnsureFillerObjectAtTop();
821 821
822 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) { 822 if (collector == SCAVENGER && !incremental_marking()->IsStopped()) {
823 if (FLAG_trace_incremental_marking) { 823 if (FLAG_trace_incremental_marking) {
824 PrintF("[IncrementalMarking] Scavenge during marking.\n"); 824 PrintF("[IncrementalMarking] Scavenge during marking.\n");
825 } 825 }
826 } 826 }
827 827
828 if (collector == MARK_COMPACTOR && 828 if (collector == MARK_COMPACTOR &&
829 !mark_compact_collector()->finalize_incremental_marking() &&
829 !mark_compact_collector()->abort_incremental_marking() && 830 !mark_compact_collector()->abort_incremental_marking() &&
830 !incremental_marking()->IsStopped() && 831 !incremental_marking()->IsStopped() &&
831 !incremental_marking()->should_hurry() && 832 !incremental_marking()->should_hurry() &&
832 FLAG_incremental_marking_steps) { 833 FLAG_incremental_marking_steps) {
833 // Make progress in incremental marking. 834 // Make progress in incremental marking.
834 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; 835 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB;
835 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, 836 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge,
836 IncrementalMarking::NO_GC_VIA_STACK_GUARD); 837 IncrementalMarking::NO_GC_VIA_STACK_GUARD);
837 if (!incremental_marking()->IsComplete() && 838 if (!incremental_marking()->IsComplete() &&
838 !mark_compact_collector_.marking_deque_.IsEmpty() && !FLAG_gc_global) { 839 !mark_compact_collector_.marking_deque_.IsEmpty() && !FLAG_gc_global) {
(...skipping 5467 matching lines...) Expand 10 before | Expand all | Expand 10 after
6306 static_cast<int>(object_sizes_last_time_[index])); 6307 static_cast<int>(object_sizes_last_time_[index]));
6307 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6308 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6308 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6309 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6309 6310
6310 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6311 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6311 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6312 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6312 ClearObjectStats(); 6313 ClearObjectStats();
6313 } 6314 }
6314 } 6315 }
6315 } // namespace v8::internal 6316 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698