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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1589 LOG(isolate_, ResourceEvent("scavenge", "begin")); | 1589 LOG(isolate_, ResourceEvent("scavenge", "begin")); |
1590 | 1590 |
1591 // Clear descriptor cache. | 1591 // Clear descriptor cache. |
1592 isolate_->descriptor_lookup_cache()->Clear(); | 1592 isolate_->descriptor_lookup_cache()->Clear(); |
1593 | 1593 |
1594 // Used for updating survived_since_last_expansion_ at function end. | 1594 // Used for updating survived_since_last_expansion_ at function end. |
1595 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); | 1595 intptr_t survived_watermark = PromotedSpaceSizeOfObjects(); |
1596 | 1596 |
1597 SelectScavengingVisitorsTable(); | 1597 SelectScavengingVisitorsTable(); |
1598 | 1598 |
1599 incremental_marking()->PrepareForScavenge(); | |
1600 | |
1601 // Flip the semispaces. After flipping, to space is empty, from space has | 1599 // Flip the semispaces. After flipping, to space is empty, from space has |
1602 // live objects. | 1600 // live objects. |
1603 new_space_.Flip(); | 1601 new_space_.Flip(); |
1604 new_space_.ResetAllocationInfo(); | 1602 new_space_.ResetAllocationInfo(); |
1605 | 1603 |
1606 // We need to sweep newly copied objects which can be either in the | 1604 // We need to sweep newly copied objects which can be either in the |
1607 // to space or promoted to the old generation. For to-space | 1605 // to space or promoted to the old generation. For to-space |
1608 // objects, we treat the bottom of the to space as a queue. Newly | 1606 // objects, we treat the bottom of the to space as a queue. Newly |
1609 // copied and unswept objects lie between a 'front' mark and the | 1607 // copied and unswept objects lie between a 'front' mark and the |
1610 // allocation pointer. | 1608 // allocation pointer. |
(...skipping 4999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6610 *object_type = "CODE_TYPE"; \ | 6608 *object_type = "CODE_TYPE"; \ |
6611 *object_sub_type = "CODE_AGE/" #name; \ | 6609 *object_sub_type = "CODE_AGE/" #name; \ |
6612 return true; | 6610 return true; |
6613 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6611 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6614 #undef COMPARE_AND_RETURN_NAME | 6612 #undef COMPARE_AND_RETURN_NAME |
6615 } | 6613 } |
6616 return false; | 6614 return false; |
6617 } | 6615 } |
6618 } | 6616 } |
6619 } // namespace v8::internal | 6617 } // namespace v8::internal |
OLD | NEW |