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