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 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 | 1510 |
1511 // Used for updating survived_since_last_expansion_ at function end. | 1511 // Used for updating survived_since_last_expansion_ at function end. |
1512 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); | 1512 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); |
1513 | 1513 |
1514 CheckNewSpaceExpansionCriteria(); | 1514 CheckNewSpaceExpansionCriteria(); |
1515 | 1515 |
1516 SelectScavengingVisitorsTable(); | 1516 SelectScavengingVisitorsTable(); |
1517 | 1517 |
1518 incremental_marking()->PrepareForScavenge(); | 1518 incremental_marking()->PrepareForScavenge(); |
1519 | 1519 |
1520 paged_space(OLD_DATA_SPACE)->EnsureSweeperProgress(new_space_.Size()); | |
1521 paged_space(OLD_POINTER_SPACE)->EnsureSweeperProgress(new_space_.Size()); | |
1522 | |
1523 // Flip the semispaces. After flipping, to space is empty, from space has | 1520 // Flip the semispaces. After flipping, to space is empty, from space has |
1524 // live objects. | 1521 // live objects. |
1525 new_space_.Flip(); | 1522 new_space_.Flip(); |
1526 new_space_.ResetAllocationInfo(); | 1523 new_space_.ResetAllocationInfo(); |
1527 | 1524 |
1528 // We need to sweep newly copied objects which can be either in the | 1525 // We need to sweep newly copied objects which can be either in the |
1529 // to space or promoted to the old generation. For to-space | 1526 // to space or promoted to the old generation. For to-space |
1530 // objects, we treat the bottom of the to space as a queue. Newly | 1527 // objects, we treat the bottom of the to space as a queue. Newly |
1531 // copied and unswept objects lie between a 'front' mark and the | 1528 // copied and unswept objects lie between a 'front' mark and the |
1532 // allocation pointer. | 1529 // allocation pointer. |
(...skipping 5100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6633 static_cast<int>(object_sizes_last_time_[index])); | 6630 static_cast<int>(object_sizes_last_time_[index])); |
6634 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6631 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6635 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6632 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6636 | 6633 |
6637 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6634 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6638 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6635 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6639 ClearObjectStats(); | 6636 ClearObjectStats(); |
6640 } | 6637 } |
6641 | 6638 |
6642 } } // namespace v8::internal | 6639 } } // namespace v8::internal |
OLD | NEW |