| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 allocation_allowed_(true), | 110 allocation_allowed_(true), |
| 111 allocation_timeout_(0), | 111 allocation_timeout_(0), |
| 112 disallow_allocation_failure_(false), | 112 disallow_allocation_failure_(false), |
| 113 debug_utils_(NULL), | 113 debug_utils_(NULL), |
| 114 #endif // DEBUG | 114 #endif // DEBUG |
| 115 new_space_high_promotion_mode_active_(false), | 115 new_space_high_promotion_mode_active_(false), |
| 116 old_gen_promotion_limit_(kMinimumPromotionLimit), | 116 old_gen_promotion_limit_(kMinimumPromotionLimit), |
| 117 old_gen_allocation_limit_(kMinimumAllocationLimit), | 117 old_gen_allocation_limit_(kMinimumAllocationLimit), |
| 118 old_gen_limit_factor_(1), | 118 old_gen_limit_factor_(1), |
| 119 size_of_old_gen_at_last_old_space_gc_(0), | 119 size_of_old_gen_at_last_old_space_gc_(0), |
| 120 total_promoted_at_last_old_space_gc_(0), |
| 120 external_allocation_limit_(0), | 121 external_allocation_limit_(0), |
| 121 amount_of_external_allocated_memory_(0), | 122 amount_of_external_allocated_memory_(0), |
| 122 amount_of_external_allocated_memory_at_last_global_gc_(0), | 123 amount_of_external_allocated_memory_at_last_global_gc_(0), |
| 123 old_gen_exhausted_(false), | 124 old_gen_exhausted_(false), |
| 124 store_buffer_rebuilder_(store_buffer()), | 125 store_buffer_rebuilder_(store_buffer()), |
| 125 hidden_symbol_(NULL), | 126 hidden_symbol_(NULL), |
| 126 global_gc_prologue_callback_(NULL), | 127 global_gc_prologue_callback_(NULL), |
| 127 global_gc_epilogue_callback_(NULL), | 128 global_gc_epilogue_callback_(NULL), |
| 128 gc_safe_size_of_old_object_(NULL), | 129 gc_safe_size_of_old_object_(NULL), |
| 129 total_regexp_code_generated_(0), | 130 total_regexp_code_generated_(0), |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 if (collector == MARK_COMPACTOR) { | 790 if (collector == MARK_COMPACTOR) { |
| 790 // Perform mark-sweep with optional compaction. | 791 // Perform mark-sweep with optional compaction. |
| 791 MarkCompact(tracer); | 792 MarkCompact(tracer); |
| 792 sweep_generation_++; | 793 sweep_generation_++; |
| 793 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() && | 794 bool high_survival_rate_during_scavenges = IsHighSurvivalRate() && |
| 794 IsStableOrIncreasingSurvivalTrend(); | 795 IsStableOrIncreasingSurvivalTrend(); |
| 795 | 796 |
| 796 UpdateSurvivalRateTrend(start_new_space_size); | 797 UpdateSurvivalRateTrend(start_new_space_size); |
| 797 | 798 |
| 798 size_of_old_gen_at_last_old_space_gc_ = PromotedSpaceSize(); | 799 size_of_old_gen_at_last_old_space_gc_ = PromotedSpaceSize(); |
| 800 total_promoted_at_last_old_space_gc_ = PromotedTotalSizeOfObjects(); |
| 799 | 801 |
| 800 if (high_survival_rate_during_scavenges && | 802 if (high_survival_rate_during_scavenges && |
| 801 IsStableOrIncreasingSurvivalTrend()) { | 803 IsStableOrIncreasingSurvivalTrend()) { |
| 802 // Stable high survival rates of young objects both during partial and | 804 // Stable high survival rates of young objects both during partial and |
| 803 // full collection indicate that mutator is either building or modifying | 805 // full collection indicate that mutator is either building or modifying |
| 804 // a structure with a long lifetime. | 806 // a structure with a long lifetime. |
| 805 // In this case we aggressively raise old generation memory limits to | 807 // In this case we aggressively raise old generation memory limits to |
| 806 // postpone subsequent mark-sweep collection and thus trade memory | 808 // postpone subsequent mark-sweep collection and thus trade memory |
| 807 // space for the mutation speed. | 809 // space for the mutation speed. |
| 808 old_gen_limit_factor_ = 2; | 810 old_gen_limit_factor_ = 2; |
| (...skipping 6158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6967 } else { | 6969 } else { |
| 6968 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. | 6970 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. |
| 6969 } | 6971 } |
| 6970 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = | 6972 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = |
| 6971 reinterpret_cast<Address>(p); | 6973 reinterpret_cast<Address>(p); |
| 6972 remembered_unmapped_pages_index_++; | 6974 remembered_unmapped_pages_index_++; |
| 6973 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; | 6975 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; |
| 6974 } | 6976 } |
| 6975 | 6977 |
| 6976 } } // namespace v8::internal | 6978 } } // namespace v8::internal |
| OLD | NEW |