OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 4546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4557 AdvanceIdleIncrementalMarking(step_size); | 4557 AdvanceIdleIncrementalMarking(step_size); |
4558 } | 4558 } |
4559 | 4559 |
4560 // After context disposal there is likely a lot of garbage remaining, reset | 4560 // After context disposal there is likely a lot of garbage remaining, reset |
4561 // the idle notification counters in order to trigger more incremental GCs | 4561 // the idle notification counters in order to trigger more incremental GCs |
4562 // on subsequent idle notifications. | 4562 // on subsequent idle notifications. |
4563 StartIdleRound(); | 4563 StartIdleRound(); |
4564 return false; | 4564 return false; |
4565 } | 4565 } |
4566 | 4566 |
4567 if (!FLAG_incremental_marking || Serializer::enabled()) { | 4567 if (!FLAG_incremental_marking || Serializer::enabled(isolate_)) { |
4568 return IdleGlobalGC(); | 4568 return IdleGlobalGC(); |
4569 } | 4569 } |
4570 | 4570 |
4571 // By doing small chunks of GC work in each IdleNotification, | 4571 // By doing small chunks of GC work in each IdleNotification, |
4572 // perform a round of incremental GCs and after that wait until | 4572 // perform a round of incremental GCs and after that wait until |
4573 // the mutator creates enough garbage to justify a new round. | 4573 // the mutator creates enough garbage to justify a new round. |
4574 // An incremental GC progresses as follows: | 4574 // An incremental GC progresses as follows: |
4575 // 1. many incremental marking steps, | 4575 // 1. many incremental marking steps, |
4576 // 2. one old space mark-sweep-compact, | 4576 // 2. one old space mark-sweep-compact, |
4577 // Use mark-sweep-compact events to count incremental GCs in a round. | 4577 // Use mark-sweep-compact events to count incremental GCs in a round. |
(...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6633 static_cast<int>(object_sizes_last_time_[index])); | 6633 static_cast<int>(object_sizes_last_time_[index])); |
6634 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6634 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6635 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6635 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6636 | 6636 |
6637 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6637 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6638 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6638 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6639 ClearObjectStats(); | 6639 ClearObjectStats(); |
6640 } | 6640 } |
6641 | 6641 |
6642 } } // namespace v8::internal | 6642 } } // namespace v8::internal |
OLD | NEW |