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

Side by Side Diff: src/heap.cc

Issue 345263004: Collect garbage with kReduceMemoryFootprintMask in IdleNotification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | 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/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/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 4251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4262 incremental_marking()->Step(step_size, 4262 incremental_marking()->Step(step_size,
4263 IncrementalMarking::NO_GC_VIA_STACK_GUARD); 4263 IncrementalMarking::NO_GC_VIA_STACK_GUARD);
4264 4264
4265 if (incremental_marking()->IsComplete()) { 4265 if (incremental_marking()->IsComplete()) {
4266 bool uncommit = false; 4266 bool uncommit = false;
4267 if (gc_count_at_last_idle_gc_ == gc_count_) { 4267 if (gc_count_at_last_idle_gc_ == gc_count_) {
4268 // No GC since the last full GC, the mutator is probably not active. 4268 // No GC since the last full GC, the mutator is probably not active.
4269 isolate_->compilation_cache()->Clear(); 4269 isolate_->compilation_cache()->Clear();
4270 uncommit = true; 4270 uncommit = true;
4271 } 4271 }
4272 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); 4272 CollectAllGarbage(kReduceMemoryFootprintMask,
4273 "idle notification: finalize incremental");
4273 mark_sweeps_since_idle_round_started_++; 4274 mark_sweeps_since_idle_round_started_++;
4274 gc_count_at_last_idle_gc_ = gc_count_; 4275 gc_count_at_last_idle_gc_ = gc_count_;
4275 if (uncommit) { 4276 if (uncommit) {
4276 new_space_.Shrink(); 4277 new_space_.Shrink();
4277 UncommitFromSpace(); 4278 UncommitFromSpace();
4278 } 4279 }
4279 } 4280 }
4280 } 4281 }
4281 4282
4282 4283
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
6435 static_cast<int>(object_sizes_last_time_[index])); 6436 static_cast<int>(object_sizes_last_time_[index]));
6436 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6437 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6437 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6438 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6438 6439
6439 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6440 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6440 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6441 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6441 ClearObjectStats(); 6442 ClearObjectStats();
6442 } 6443 }
6443 6444
6444 } } // namespace v8::internal 6445 } } // namespace v8::internal
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