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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 567 |
568 | 568 |
569 void Heap::GarbageCollectionEpilogue() { | 569 void Heap::GarbageCollectionEpilogue() { |
570 store_buffer()->GCEpilogue(); | 570 store_buffer()->GCEpilogue(); |
571 | 571 |
572 // In release mode, we only zap the from space under heap verification. | 572 // In release mode, we only zap the from space under heap verification. |
573 if (Heap::ShouldZapGarbage()) { | 573 if (Heap::ShouldZapGarbage()) { |
574 ZapFromSpace(); | 574 ZapFromSpace(); |
575 } | 575 } |
576 | 576 |
| 577 // Process pretenuring feedback and update allocation sites. |
| 578 ProcessPretenuringFeedback(); |
| 579 |
577 #ifdef VERIFY_HEAP | 580 #ifdef VERIFY_HEAP |
578 if (FLAG_verify_heap) { | 581 if (FLAG_verify_heap) { |
579 Verify(); | 582 Verify(); |
580 } | 583 } |
581 #endif | 584 #endif |
582 | 585 |
583 AllowHeapAllocation for_the_rest_of_the_epilogue; | 586 AllowHeapAllocation for_the_rest_of_the_epilogue; |
584 | 587 |
585 #ifdef DEBUG | 588 #ifdef DEBUG |
586 if (FLAG_print_global_handles) isolate_->global_handles()->Print(); | 589 if (FLAG_print_global_handles) isolate_->global_handles()->Print(); |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 // Set age mark. | 1613 // Set age mark. |
1611 new_space_.set_age_mark(new_space_.top()); | 1614 new_space_.set_age_mark(new_space_.top()); |
1612 | 1615 |
1613 new_space_.LowerInlineAllocationLimit( | 1616 new_space_.LowerInlineAllocationLimit( |
1614 new_space_.inline_allocation_limit_step()); | 1617 new_space_.inline_allocation_limit_step()); |
1615 | 1618 |
1616 // Update how much has survived scavenge. | 1619 // Update how much has survived scavenge. |
1617 IncrementYoungSurvivorsCounter(static_cast<int>( | 1620 IncrementYoungSurvivorsCounter(static_cast<int>( |
1618 (PromotedSpaceSizeOfObjects() - survived_watermark) + new_space_.Size())); | 1621 (PromotedSpaceSizeOfObjects() - survived_watermark) + new_space_.Size())); |
1619 | 1622 |
1620 ProcessPretenuringFeedback(); | |
1621 | |
1622 LOG(isolate_, ResourceEvent("scavenge", "end")); | 1623 LOG(isolate_, ResourceEvent("scavenge", "end")); |
1623 | 1624 |
1624 gc_state_ = NOT_IN_GC; | 1625 gc_state_ = NOT_IN_GC; |
1625 | 1626 |
1626 scavenges_since_last_idle_round_++; | 1627 scavenges_since_last_idle_round_++; |
1627 } | 1628 } |
1628 | 1629 |
1629 | 1630 |
1630 String* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, | 1631 String* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, |
1631 Object** p) { | 1632 Object** p) { |
(...skipping 6030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7662 static_cast<int>(object_sizes_last_time_[index])); | 7663 static_cast<int>(object_sizes_last_time_[index])); |
7663 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7664 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7664 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7665 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7665 | 7666 |
7666 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7667 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7667 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7668 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7668 ClearObjectStats(); | 7669 ClearObjectStats(); |
7669 } | 7670 } |
7670 | 7671 |
7671 } } // namespace v8::internal | 7672 } } // namespace v8::internal |
OLD | NEW |