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 5601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5612 AdvanceIdleIncrementalMarking(step_size); | 5612 AdvanceIdleIncrementalMarking(step_size); |
5613 } | 5613 } |
5614 | 5614 |
5615 // After context disposal there is likely a lot of garbage remaining, reset | 5615 // After context disposal there is likely a lot of garbage remaining, reset |
5616 // the idle notification counters in order to trigger more incremental GCs | 5616 // the idle notification counters in order to trigger more incremental GCs |
5617 // on subsequent idle notifications. | 5617 // on subsequent idle notifications. |
5618 StartIdleRound(); | 5618 StartIdleRound(); |
5619 return false; | 5619 return false; |
5620 } | 5620 } |
5621 | 5621 |
5622 if (!FLAG_incremental_marking || FLAG_expose_gc || Serializer::enabled()) { | 5622 if (!FLAG_incremental_marking || Serializer::enabled()) { |
5623 return IdleGlobalGC(); | 5623 return IdleGlobalGC(); |
5624 } | 5624 } |
5625 | 5625 |
5626 // By doing small chunks of GC work in each IdleNotification, | 5626 // By doing small chunks of GC work in each IdleNotification, |
5627 // perform a round of incremental GCs and after that wait until | 5627 // perform a round of incremental GCs and after that wait until |
5628 // the mutator creates enough garbage to justify a new round. | 5628 // the mutator creates enough garbage to justify a new round. |
5629 // An incremental GC progresses as follows: | 5629 // An incremental GC progresses as follows: |
5630 // 1. many incremental marking steps, | 5630 // 1. many incremental marking steps, |
5631 // 2. one old space mark-sweep-compact, | 5631 // 2. one old space mark-sweep-compact, |
5632 // 3. many lazy sweep steps. | 5632 // 3. many lazy sweep steps. |
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7737 static_cast<int>(object_sizes_last_time_[index])); | 7737 static_cast<int>(object_sizes_last_time_[index])); |
7738 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7738 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7739 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7739 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7740 | 7740 |
7741 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7741 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7742 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7742 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7743 ClearObjectStats(); | 7743 ClearObjectStats(); |
7744 } | 7744 } |
7745 | 7745 |
7746 } } // namespace v8::internal | 7746 } } // namespace v8::internal |
OLD | NEW |