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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 IsStableOrDecreasingSurvivalTrend() && | 963 IsStableOrDecreasingSurvivalTrend() && |
964 IsLowSurvivalRate()) { | 964 IsLowSurvivalRate()) { |
965 // Decreasing low survival rates might indicate that the above high | 965 // Decreasing low survival rates might indicate that the above high |
966 // promotion mode is over and we should allow the young generation | 966 // promotion mode is over and we should allow the young generation |
967 // to grow again. | 967 // to grow again. |
968 new_space_high_promotion_mode_active_ = false; | 968 new_space_high_promotion_mode_active_ = false; |
969 if (FLAG_trace_gc) { | 969 if (FLAG_trace_gc) { |
970 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", |
971 new_space_.MaximumCapacity() / MB); | 971 new_space_.MaximumCapacity() / MB); |
972 } | 972 } |
| 973 // Trigger deoptimization here to turn off pre-tenuring as soon as |
| 974 // possible. |
| 975 if (FLAG_pretenure_literals) { |
| 976 isolate_->stack_guard()->FullDeopt(); |
| 977 } |
973 } | 978 } |
974 | 979 |
975 if (new_space_high_promotion_mode_active_ && | 980 if (new_space_high_promotion_mode_active_ && |
976 new_space_.Capacity() > new_space_.InitialCapacity()) { | 981 new_space_.Capacity() > new_space_.InitialCapacity()) { |
977 new_space_.Shrink(); | 982 new_space_.Shrink(); |
978 } | 983 } |
979 | 984 |
980 isolate_->counters()->objs_since_last_young()->Set(0); | 985 isolate_->counters()->objs_since_last_young()->Set(0); |
981 | 986 |
982 // Callbacks that fire after this point might trigger nested GCs and | 987 // Callbacks that fire after this point might trigger nested GCs and |
(...skipping 6857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7840 static_cast<int>(object_sizes_last_time_[index])); | 7845 static_cast<int>(object_sizes_last_time_[index])); |
7841 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7846 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7842 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7847 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7843 | 7848 |
7844 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7849 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7845 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7850 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7846 ClearObjectStats(); | 7851 ClearObjectStats(); |
7847 } | 7852 } |
7848 | 7853 |
7849 } } // namespace v8::internal | 7854 } } // namespace v8::internal |
OLD | NEW |