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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 IsHighSurvivalRate()) { | 945 IsHighSurvivalRate()) { |
946 // Stable high survival rates even though young generation is at | 946 // Stable high survival rates even though young generation is at |
947 // maximum capacity indicates that most objects will be promoted. | 947 // maximum capacity indicates that most objects will be promoted. |
948 // To decrease scavenger pauses and final mark-sweep pauses, we | 948 // To decrease scavenger pauses and final mark-sweep pauses, we |
949 // have to limit maximal capacity of the young generation. | 949 // have to limit maximal capacity of the young generation. |
950 new_space_high_promotion_mode_active_ = true; | 950 new_space_high_promotion_mode_active_ = true; |
951 if (FLAG_trace_gc) { | 951 if (FLAG_trace_gc) { |
952 PrintPID("Limited new space size due to high promotion rate: %d MB\n", | 952 PrintPID("Limited new space size due to high promotion rate: %d MB\n", |
953 new_space_.InitialCapacity() / MB); | 953 new_space_.InitialCapacity() / MB); |
954 } | 954 } |
| 955 // Support for global pre-tenuring uses the high promotion mode as a |
| 956 // heuristic indicator of whether to pretenure or not, we trigger |
| 957 // deoptimization here to take advantage of pre-tenuring as soon as |
| 958 // possible. |
| 959 if (FLAG_pretenure_literals) { |
| 960 isolate_->stack_guard()->FullDeopt(); |
| 961 } |
955 } else if (new_space_high_promotion_mode_active_ && | 962 } else if (new_space_high_promotion_mode_active_ && |
956 IsStableOrDecreasingSurvivalTrend() && | 963 IsStableOrDecreasingSurvivalTrend() && |
957 IsLowSurvivalRate()) { | 964 IsLowSurvivalRate()) { |
958 // Decreasing low survival rates might indicate that the above high | 965 // Decreasing low survival rates might indicate that the above high |
959 // promotion mode is over and we should allow the young generation | 966 // promotion mode is over and we should allow the young generation |
960 // to grow again. | 967 // to grow again. |
961 new_space_high_promotion_mode_active_ = false; | 968 new_space_high_promotion_mode_active_ = false; |
962 if (FLAG_trace_gc) { | 969 if (FLAG_trace_gc) { |
963 PrintPID("Unlimited new space size due to low promotion rate: %d MB\n", | 970 PrintPID("Unlimited new space size due to low promotion rate: %d MB\n", |
964 new_space_.MaximumCapacity() / MB); | 971 new_space_.MaximumCapacity() / MB); |
(...skipping 6848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7813 static_cast<int>(object_sizes_last_time_[index])); | 7820 static_cast<int>(object_sizes_last_time_[index])); |
7814 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7821 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7815 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7822 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7816 | 7823 |
7817 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7824 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7818 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7825 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7819 ClearObjectStats(); | 7826 ClearObjectStats(); |
7820 } | 7827 } |
7821 | 7828 |
7822 } } // namespace v8::internal | 7829 } } // namespace v8::internal |
OLD | NEW |