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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX); | 900 Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX); |
901 if (!cache->IsUndefined()) { | 901 if (!cache->IsUndefined()) { |
902 NormalizedMapCache::cast(cache)->Clear(); | 902 NormalizedMapCache::cast(cache)->Clear(); |
903 } | 903 } |
904 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); | 904 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); |
905 } | 905 } |
906 } | 906 } |
907 | 907 |
908 | 908 |
909 void Heap::UpdateSurvivalRateTrend(int start_new_space_size) { | 909 void Heap::UpdateSurvivalRateTrend(int start_new_space_size) { |
| 910 if (start_new_space_size == 0) return; |
| 911 |
910 double survival_rate = | 912 double survival_rate = |
911 (static_cast<double>(young_survivors_after_last_gc_) * 100) / | 913 (static_cast<double>(young_survivors_after_last_gc_) * 100) / |
912 start_new_space_size; | 914 start_new_space_size; |
913 | 915 |
914 if (survival_rate > kYoungSurvivalRateHighThreshold) { | 916 if (survival_rate > kYoungSurvivalRateHighThreshold) { |
915 high_survival_rate_period_length_++; | 917 high_survival_rate_period_length_++; |
916 } else { | 918 } else { |
917 high_survival_rate_period_length_ = 0; | 919 high_survival_rate_period_length_ = 0; |
918 } | 920 } |
919 | 921 |
(...skipping 7047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7967 if (FLAG_concurrent_recompilation) { | 7969 if (FLAG_concurrent_recompilation) { |
7968 heap_->relocation_mutex_->Lock(); | 7970 heap_->relocation_mutex_->Lock(); |
7969 #ifdef DEBUG | 7971 #ifdef DEBUG |
7970 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7972 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7971 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7973 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7972 #endif // DEBUG | 7974 #endif // DEBUG |
7973 } | 7975 } |
7974 } | 7976 } |
7975 | 7977 |
7976 } } // namespace v8::internal | 7978 } } // namespace v8::internal |
OLD | NEW |