OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 scan_on_scavenge_pages_(0), | 95 scan_on_scavenge_pages_(0), |
96 new_space_(this), | 96 new_space_(this), |
97 old_space_(NULL), | 97 old_space_(NULL), |
98 code_space_(NULL), | 98 code_space_(NULL), |
99 map_space_(NULL), | 99 map_space_(NULL), |
100 lo_space_(NULL), | 100 lo_space_(NULL), |
101 gc_state_(NOT_IN_GC), | 101 gc_state_(NOT_IN_GC), |
102 gc_post_processing_depth_(0), | 102 gc_post_processing_depth_(0), |
103 allocations_count_(0), | 103 allocations_count_(0), |
104 raw_allocations_hash_(0), | 104 raw_allocations_hash_(0), |
105 dump_allocations_hash_countdown_(FLAG_dump_allocations_digest_at_alloc), | |
106 ms_count_(0), | 105 ms_count_(0), |
107 gc_count_(0), | 106 gc_count_(0), |
108 remembered_unmapped_pages_index_(0), | 107 remembered_unmapped_pages_index_(0), |
109 #ifdef DEBUG | 108 #ifdef DEBUG |
110 allocation_timeout_(0), | 109 allocation_timeout_(0), |
111 #endif // DEBUG | 110 #endif // DEBUG |
112 old_generation_allocation_limit_(initial_old_generation_size_), | 111 old_generation_allocation_limit_(initial_old_generation_size_), |
113 old_gen_exhausted_(false), | 112 old_gen_exhausted_(false), |
114 optimize_for_memory_usage_(false), | 113 optimize_for_memory_usage_(false), |
115 inline_allocation_disabled_(false), | 114 inline_allocation_disabled_(false), |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 if (!dependant_context) { | 1048 if (!dependant_context) { |
1050 tracer()->ResetSurvivalEvents(); | 1049 tracer()->ResetSurvivalEvents(); |
1051 old_generation_size_configured_ = false; | 1050 old_generation_size_configured_ = false; |
1052 } | 1051 } |
1053 if (isolate()->concurrent_recompilation_enabled()) { | 1052 if (isolate()->concurrent_recompilation_enabled()) { |
1054 // Flush the queued recompilation tasks. | 1053 // Flush the queued recompilation tasks. |
1055 isolate()->optimizing_compile_dispatcher()->Flush(); | 1054 isolate()->optimizing_compile_dispatcher()->Flush(); |
1056 } | 1055 } |
1057 AgeInlineCaches(); | 1056 AgeInlineCaches(); |
1058 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 1057 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
1059 tracer()->AddContextDisposalTime(base::OS::TimeCurrentMillis()); | 1058 tracer()->AddContextDisposalTime(MonotonicallyIncreasingTimeInMs()); |
1060 MemoryReducer::Event event; | 1059 MemoryReducer::Event event; |
1061 event.type = MemoryReducer::kContextDisposed; | 1060 event.type = MemoryReducer::kContextDisposed; |
1062 event.time_ms = MonotonicallyIncreasingTimeInMs(); | 1061 event.time_ms = MonotonicallyIncreasingTimeInMs(); |
1063 memory_reducer_->NotifyContextDisposed(event); | 1062 memory_reducer_->NotifyContextDisposed(event); |
1064 return ++contexts_disposed_; | 1063 return ++contexts_disposed_; |
1065 } | 1064 } |
1066 | 1065 |
1067 | 1066 |
1068 void Heap::StartIncrementalMarking(int gc_flags, | 1067 void Heap::StartIncrementalMarking(int gc_flags, |
1069 const GCCallbackFlags gc_callback_flags, | 1068 const GCCallbackFlags gc_callback_flags, |
(...skipping 5118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6188 } | 6187 } |
6189 | 6188 |
6190 | 6189 |
6191 // static | 6190 // static |
6192 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6191 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6193 return StaticVisitorBase::GetVisitorId(map); | 6192 return StaticVisitorBase::GetVisitorId(map); |
6194 } | 6193 } |
6195 | 6194 |
6196 } // namespace internal | 6195 } // namespace internal |
6197 } // namespace v8 | 6196 } // namespace v8 |
OLD | NEW |