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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Variables set based on semispace_size_ and old_generation_size_ in | 90 // Variables set based on semispace_size_ and old_generation_size_ in |
91 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) | 91 // ConfigureHeap (survived_since_last_expansion_, external_allocation_limit_) |
92 // Will be 4 * reserved_semispace_size_ to ensure that young | 92 // Will be 4 * reserved_semispace_size_ to ensure that young |
93 // generation can be aligned to its size. | 93 // generation can be aligned to its size. |
94 survived_since_last_expansion_(0), | 94 survived_since_last_expansion_(0), |
95 sweep_generation_(0), | 95 sweep_generation_(0), |
96 always_allocate_scope_depth_(0), | 96 always_allocate_scope_depth_(0), |
97 linear_allocation_scope_depth_(0), | 97 linear_allocation_scope_depth_(0), |
98 contexts_disposed_(0), | 98 contexts_disposed_(0), |
99 global_ic_age_(0), | 99 global_ic_age_(0), |
| 100 flush_monomorphic_ics_(false), |
100 scan_on_scavenge_pages_(0), | 101 scan_on_scavenge_pages_(0), |
101 new_space_(this), | 102 new_space_(this), |
102 old_pointer_space_(NULL), | 103 old_pointer_space_(NULL), |
103 old_data_space_(NULL), | 104 old_data_space_(NULL), |
104 code_space_(NULL), | 105 code_space_(NULL), |
105 map_space_(NULL), | 106 map_space_(NULL), |
106 cell_space_(NULL), | 107 cell_space_(NULL), |
107 lo_space_(NULL), | 108 lo_space_(NULL), |
108 gc_state_(NOT_IN_GC), | 109 gc_state_(NOT_IN_GC), |
109 gc_post_processing_depth_(0), | 110 gc_post_processing_depth_(0), |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 mark_compact_collector_.CollectGarbage(); | 986 mark_compact_collector_.CollectGarbage(); |
986 | 987 |
987 LOG(isolate_, ResourceEvent("markcompact", "end")); | 988 LOG(isolate_, ResourceEvent("markcompact", "end")); |
988 | 989 |
989 gc_state_ = NOT_IN_GC; | 990 gc_state_ = NOT_IN_GC; |
990 | 991 |
991 isolate_->counters()->objs_since_last_full()->Set(0); | 992 isolate_->counters()->objs_since_last_full()->Set(0); |
992 | 993 |
993 contexts_disposed_ = 0; | 994 contexts_disposed_ = 0; |
994 | 995 |
995 isolate_->set_context_exit_happened(false); | 996 flush_monomorphic_ics_ = false; |
996 } | 997 } |
997 | 998 |
998 | 999 |
999 void Heap::MarkCompactPrologue() { | 1000 void Heap::MarkCompactPrologue() { |
1000 // At any old GC clear the keyed lookup cache to enable collection of unused | 1001 // At any old GC clear the keyed lookup cache to enable collection of unused |
1001 // maps. | 1002 // maps. |
1002 isolate_->keyed_lookup_cache()->Clear(); | 1003 isolate_->keyed_lookup_cache()->Clear(); |
1003 isolate_->context_slot_cache()->Clear(); | 1004 isolate_->context_slot_cache()->Clear(); |
1004 isolate_->descriptor_lookup_cache()->Clear(); | 1005 isolate_->descriptor_lookup_cache()->Clear(); |
1005 StringSplitCache::Clear(string_split_cache()); | 1006 StringSplitCache::Clear(string_split_cache()); |
(...skipping 6257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7263 static_cast<int>(object_sizes_last_time_[index])); | 7264 static_cast<int>(object_sizes_last_time_[index])); |
7264 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7265 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7265 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7266 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7266 | 7267 |
7267 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7268 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7268 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7269 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7269 ClearObjectStats(); | 7270 ClearObjectStats(); |
7270 } | 7271 } |
7271 | 7272 |
7272 } } // namespace v8::internal | 7273 } } // namespace v8::internal |
OLD | NEW |