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

Side by Side Diff: src/heap.cc

Issue 426243002: Force incremental marking when called from idle notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/incremental-marking.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/once.h" 9 #include "src/base/once.h"
10 #include "src/base/utils/random-number-generator.h" 10 #include "src/base/utils/random-number-generator.h"
(...skipping 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 } 4222 }
4223 if (mark_compact_collector()->sweeping_in_progress()) { 4223 if (mark_compact_collector()->sweeping_in_progress()) {
4224 mark_compact_collector()->EnsureSweepingCompleted(); 4224 mark_compact_collector()->EnsureSweepingCompleted();
4225 } 4225 }
4226 ASSERT(IsHeapIterable()); 4226 ASSERT(IsHeapIterable());
4227 } 4227 }
4228 4228
4229 4229
4230 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) { 4230 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) {
4231 incremental_marking()->Step(step_size, 4231 incremental_marking()->Step(step_size,
4232 IncrementalMarking::NO_GC_VIA_STACK_GUARD); 4232 IncrementalMarking::NO_GC_VIA_STACK_GUARD, true);
4233 4233
4234 if (incremental_marking()->IsComplete()) { 4234 if (incremental_marking()->IsComplete()) {
4235 bool uncommit = false; 4235 bool uncommit = false;
4236 if (gc_count_at_last_idle_gc_ == gc_count_) { 4236 if (gc_count_at_last_idle_gc_ == gc_count_) {
4237 // No GC since the last full GC, the mutator is probably not active. 4237 // No GC since the last full GC, the mutator is probably not active.
4238 isolate_->compilation_cache()->Clear(); 4238 isolate_->compilation_cache()->Clear();
4239 uncommit = true; 4239 uncommit = true;
4240 } 4240 }
4241 CollectAllGarbage(kReduceMemoryFootprintMask, 4241 CollectAllGarbage(kReduceMemoryFootprintMask,
4242 "idle notification: finalize incremental"); 4242 "idle notification: finalize incremental");
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
6166 static_cast<int>(object_sizes_last_time_[index])); 6166 static_cast<int>(object_sizes_last_time_[index]));
6167 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6167 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6168 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6168 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6169 6169
6170 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6170 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6171 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6171 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6172 ClearObjectStats(); 6172 ClearObjectStats();
6173 } 6173 }
6174 6174
6175 } } // namespace v8::internal 6175 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698