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), | |
101 scan_on_scavenge_pages_(0), | 100 scan_on_scavenge_pages_(0), |
102 new_space_(this), | 101 new_space_(this), |
103 old_pointer_space_(NULL), | 102 old_pointer_space_(NULL), |
104 old_data_space_(NULL), | 103 old_data_space_(NULL), |
105 code_space_(NULL), | 104 code_space_(NULL), |
106 map_space_(NULL), | 105 map_space_(NULL), |
107 cell_space_(NULL), | 106 cell_space_(NULL), |
108 lo_space_(NULL), | 107 lo_space_(NULL), |
109 gc_state_(NOT_IN_GC), | 108 gc_state_(NOT_IN_GC), |
110 gc_post_processing_depth_(0), | 109 gc_post_processing_depth_(0), |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 mark_compact_collector_.CollectGarbage(); | 985 mark_compact_collector_.CollectGarbage(); |
987 | 986 |
988 LOG(isolate_, ResourceEvent("markcompact", "end")); | 987 LOG(isolate_, ResourceEvent("markcompact", "end")); |
989 | 988 |
990 gc_state_ = NOT_IN_GC; | 989 gc_state_ = NOT_IN_GC; |
991 | 990 |
992 isolate_->counters()->objs_since_last_full()->Set(0); | 991 isolate_->counters()->objs_since_last_full()->Set(0); |
993 | 992 |
994 contexts_disposed_ = 0; | 993 contexts_disposed_ = 0; |
995 | 994 |
996 flush_monomorphic_ics_ = false; | 995 isolate_->set_context_exit_happened(false); |
997 } | 996 } |
998 | 997 |
999 | 998 |
1000 void Heap::MarkCompactPrologue() { | 999 void Heap::MarkCompactPrologue() { |
1001 // At any old GC clear the keyed lookup cache to enable collection of unused | 1000 // At any old GC clear the keyed lookup cache to enable collection of unused |
1002 // maps. | 1001 // maps. |
1003 isolate_->keyed_lookup_cache()->Clear(); | 1002 isolate_->keyed_lookup_cache()->Clear(); |
1004 isolate_->context_slot_cache()->Clear(); | 1003 isolate_->context_slot_cache()->Clear(); |
1005 isolate_->descriptor_lookup_cache()->Clear(); | 1004 isolate_->descriptor_lookup_cache()->Clear(); |
1006 StringSplitCache::Clear(string_split_cache()); | 1005 StringSplitCache::Clear(string_split_cache()); |
(...skipping 6255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7262 static_cast<int>(object_sizes_last_time_[index])); | 7261 static_cast<int>(object_sizes_last_time_[index])); |
7263 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7262 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7264 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7263 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7265 | 7264 |
7266 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7265 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7267 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7266 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7268 ClearObjectStats(); | 7267 ClearObjectStats(); |
7269 } | 7268 } |
7270 | 7269 |
7271 } } // namespace v8::internal | 7270 } } // namespace v8::internal |
OLD | NEW |