| 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/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 Loading... |
| 4222 CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable"); | 4222 CollectAllGarbage(kMakeHeapIterableMask, "Heap::MakeHeapIterable"); |
| 4223 } | 4223 } |
| 4224 if (mark_compact_collector()->sweeping_in_progress()) { | 4224 if (mark_compact_collector()->sweeping_in_progress()) { |
| 4225 mark_compact_collector()->EnsureSweepingCompleted(); | 4225 mark_compact_collector()->EnsureSweepingCompleted(); |
| 4226 } | 4226 } |
| 4227 ASSERT(IsHeapIterable()); | 4227 ASSERT(IsHeapIterable()); |
| 4228 } | 4228 } |
| 4229 | 4229 |
| 4230 | 4230 |
| 4231 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) { | 4231 void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) { |
| 4232 HistogramTimerScope idle_notification_scope( | |
| 4233 isolate_->counters()->gc_incremental_marking()); | |
| 4234 | |
| 4235 incremental_marking()->Step(step_size, | 4232 incremental_marking()->Step(step_size, |
| 4236 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 4233 IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 4237 | 4234 |
| 4238 if (incremental_marking()->IsComplete()) { | 4235 if (incremental_marking()->IsComplete()) { |
| 4239 bool uncommit = false; | 4236 bool uncommit = false; |
| 4240 if (gc_count_at_last_idle_gc_ == gc_count_) { | 4237 if (gc_count_at_last_idle_gc_ == gc_count_) { |
| 4241 // No GC since the last full GC, the mutator is probably not active. | 4238 // No GC since the last full GC, the mutator is probably not active. |
| 4242 isolate_->compilation_cache()->Clear(); | 4239 isolate_->compilation_cache()->Clear(); |
| 4243 uncommit = true; | 4240 uncommit = true; |
| 4244 } | 4241 } |
| (...skipping 1985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6230 static_cast<int>(object_sizes_last_time_[index])); | 6227 static_cast<int>(object_sizes_last_time_[index])); |
| 6231 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6228 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6232 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6229 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6233 | 6230 |
| 6234 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6231 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6235 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6232 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6236 ClearObjectStats(); | 6233 ClearObjectStats(); |
| 6237 } | 6234 } |
| 6238 | 6235 |
| 6239 } } // namespace v8::internal | 6236 } } // namespace v8::internal |
| OLD | NEW |