OLD | NEW |
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 4227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4238 incremental_marking()->Step(step_size, | 4238 incremental_marking()->Step(step_size, |
4239 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 4239 IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
4240 | 4240 |
4241 if (incremental_marking()->IsComplete()) { | 4241 if (incremental_marking()->IsComplete()) { |
4242 bool uncommit = false; | 4242 bool uncommit = false; |
4243 if (gc_count_at_last_idle_gc_ == gc_count_) { | 4243 if (gc_count_at_last_idle_gc_ == gc_count_) { |
4244 // No GC since the last full GC, the mutator is probably not active. | 4244 // No GC since the last full GC, the mutator is probably not active. |
4245 isolate_->compilation_cache()->Clear(); | 4245 isolate_->compilation_cache()->Clear(); |
4246 uncommit = true; | 4246 uncommit = true; |
4247 } | 4247 } |
4248 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); | 4248 CollectAllGarbage(kReduceMemoryFootprintMask, |
| 4249 "idle notification: finalize incremental"); |
4249 mark_sweeps_since_idle_round_started_++; | 4250 mark_sweeps_since_idle_round_started_++; |
4250 gc_count_at_last_idle_gc_ = gc_count_; | 4251 gc_count_at_last_idle_gc_ = gc_count_; |
4251 if (uncommit) { | 4252 if (uncommit) { |
4252 new_space_.Shrink(); | 4253 new_space_.Shrink(); |
4253 UncommitFromSpace(); | 4254 UncommitFromSpace(); |
4254 } | 4255 } |
4255 } | 4256 } |
4256 } | 4257 } |
4257 | 4258 |
4258 | 4259 |
(...skipping 2148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6407 static_cast<int>(object_sizes_last_time_[index])); | 6408 static_cast<int>(object_sizes_last_time_[index])); |
6408 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6409 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6409 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6410 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6410 | 6411 |
6411 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6412 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6412 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6413 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6413 ClearObjectStats(); | 6414 ClearObjectStats(); |
6414 } | 6415 } |
6415 | 6416 |
6416 } } // namespace v8::internal | 6417 } } // namespace v8::internal |
OLD | NEW |