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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "accessors.h" | 7 #include "accessors.h" |
8 #include "api.h" | 8 #include "api.h" |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 4398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4409 AdvanceIdleIncrementalMarking(step_size); | 4409 AdvanceIdleIncrementalMarking(step_size); |
4410 } | 4410 } |
4411 | 4411 |
4412 // After context disposal there is likely a lot of garbage remaining, reset | 4412 // After context disposal there is likely a lot of garbage remaining, reset |
4413 // the idle notification counters in order to trigger more incremental GCs | 4413 // the idle notification counters in order to trigger more incremental GCs |
4414 // on subsequent idle notifications. | 4414 // on subsequent idle notifications. |
4415 StartIdleRound(); | 4415 StartIdleRound(); |
4416 return false; | 4416 return false; |
4417 } | 4417 } |
4418 | 4418 |
4419 if (!FLAG_incremental_marking || Serializer::enabled()) { | 4419 if (!FLAG_incremental_marking || Serializer::enabled(isolate_)) { |
4420 return IdleGlobalGC(); | 4420 return IdleGlobalGC(); |
4421 } | 4421 } |
4422 | 4422 |
4423 // By doing small chunks of GC work in each IdleNotification, | 4423 // By doing small chunks of GC work in each IdleNotification, |
4424 // perform a round of incremental GCs and after that wait until | 4424 // perform a round of incremental GCs and after that wait until |
4425 // the mutator creates enough garbage to justify a new round. | 4425 // the mutator creates enough garbage to justify a new round. |
4426 // An incremental GC progresses as follows: | 4426 // An incremental GC progresses as follows: |
4427 // 1. many incremental marking steps, | 4427 // 1. many incremental marking steps, |
4428 // 2. one old space mark-sweep-compact, | 4428 // 2. one old space mark-sweep-compact, |
4429 // Use mark-sweep-compact events to count incremental GCs in a round. | 4429 // Use mark-sweep-compact events to count incremental GCs in a round. |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6492 static_cast<int>(object_sizes_last_time_[index])); | 6492 static_cast<int>(object_sizes_last_time_[index])); |
6493 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6493 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6494 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6494 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6495 | 6495 |
6496 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6496 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6497 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6497 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6498 ClearObjectStats(); | 6498 ClearObjectStats(); |
6499 } | 6499 } |
6500 | 6500 |
6501 } } // namespace v8::internal | 6501 } } // namespace v8::internal |
OLD | NEW |