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 4371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4382 AdvanceIdleIncrementalMarking(step_size); | 4382 AdvanceIdleIncrementalMarking(step_size); |
4383 } | 4383 } |
4384 | 4384 |
4385 // After context disposal there is likely a lot of garbage remaining, reset | 4385 // After context disposal there is likely a lot of garbage remaining, reset |
4386 // the idle notification counters in order to trigger more incremental GCs | 4386 // the idle notification counters in order to trigger more incremental GCs |
4387 // on subsequent idle notifications. | 4387 // on subsequent idle notifications. |
4388 StartIdleRound(); | 4388 StartIdleRound(); |
4389 return false; | 4389 return false; |
4390 } | 4390 } |
4391 | 4391 |
4392 if (!FLAG_incremental_marking || Serializer::enabled(isolate_)) { | 4392 if (!FLAG_incremental_marking || isolate_->serializer_enabled()) { |
4393 return IdleGlobalGC(); | 4393 return IdleGlobalGC(); |
4394 } | 4394 } |
4395 | 4395 |
4396 // By doing small chunks of GC work in each IdleNotification, | 4396 // By doing small chunks of GC work in each IdleNotification, |
4397 // perform a round of incremental GCs and after that wait until | 4397 // perform a round of incremental GCs and after that wait until |
4398 // the mutator creates enough garbage to justify a new round. | 4398 // the mutator creates enough garbage to justify a new round. |
4399 // An incremental GC progresses as follows: | 4399 // An incremental GC progresses as follows: |
4400 // 1. many incremental marking steps, | 4400 // 1. many incremental marking steps, |
4401 // 2. one old space mark-sweep-compact, | 4401 // 2. one old space mark-sweep-compact, |
4402 // Use mark-sweep-compact events to count incremental GCs in a round. | 4402 // Use mark-sweep-compact events to count incremental GCs in a round. |
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6483 static_cast<int>(object_sizes_last_time_[index])); | 6483 static_cast<int>(object_sizes_last_time_[index])); |
6484 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6484 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6485 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6485 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6486 | 6486 |
6487 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6487 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6488 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6488 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6489 ClearObjectStats(); | 6489 ClearObjectStats(); |
6490 } | 6490 } |
6491 | 6491 |
6492 } } // namespace v8::internal | 6492 } } // namespace v8::internal |
OLD | NEW |