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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 } | 1020 } |
1021 | 1021 |
1022 return next_gc_likely_to_collect_more; | 1022 return next_gc_likely_to_collect_more; |
1023 } | 1023 } |
1024 | 1024 |
1025 | 1025 |
1026 int Heap::NotifyContextDisposed(bool dependant_context) { | 1026 int Heap::NotifyContextDisposed(bool dependant_context) { |
1027 if (!dependant_context) { | 1027 if (!dependant_context) { |
1028 tracer()->ResetSurvivalEvents(); | 1028 tracer()->ResetSurvivalEvents(); |
1029 old_generation_size_configured_ = false; | 1029 old_generation_size_configured_ = false; |
| 1030 MemoryReducer::Event event; |
| 1031 event.type = MemoryReducer::kContextDisposed; |
| 1032 event.time_ms = MonotonicallyIncreasingTimeInMs(); |
| 1033 memory_reducer_->NotifyContextDisposed(event); |
1030 } | 1034 } |
1031 if (isolate()->concurrent_recompilation_enabled()) { | 1035 if (isolate()->concurrent_recompilation_enabled()) { |
1032 // Flush the queued recompilation tasks. | 1036 // Flush the queued recompilation tasks. |
1033 isolate()->optimizing_compile_dispatcher()->Flush(); | 1037 isolate()->optimizing_compile_dispatcher()->Flush(); |
1034 } | 1038 } |
1035 AgeInlineCaches(); | 1039 AgeInlineCaches(); |
1036 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 1040 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
1037 tracer()->AddContextDisposalTime(MonotonicallyIncreasingTimeInMs()); | 1041 tracer()->AddContextDisposalTime(MonotonicallyIncreasingTimeInMs()); |
1038 MemoryReducer::Event event; | |
1039 event.type = MemoryReducer::kContextDisposed; | |
1040 event.time_ms = MonotonicallyIncreasingTimeInMs(); | |
1041 memory_reducer_->NotifyContextDisposed(event); | |
1042 return ++contexts_disposed_; | 1042 return ++contexts_disposed_; |
1043 } | 1043 } |
1044 | 1044 |
1045 | 1045 |
1046 void Heap::StartIncrementalMarking(int gc_flags, | 1046 void Heap::StartIncrementalMarking(int gc_flags, |
1047 const GCCallbackFlags gc_callback_flags, | 1047 const GCCallbackFlags gc_callback_flags, |
1048 const char* reason) { | 1048 const char* reason) { |
1049 DCHECK(incremental_marking()->IsStopped()); | 1049 DCHECK(incremental_marking()->IsStopped()); |
1050 set_current_gc_flags(gc_flags); | 1050 set_current_gc_flags(gc_flags); |
1051 current_gc_callback_flags_ = gc_callback_flags; | 1051 current_gc_callback_flags_ = gc_callback_flags; |
(...skipping 5099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6151 } | 6151 } |
6152 | 6152 |
6153 | 6153 |
6154 // static | 6154 // static |
6155 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6155 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6156 return StaticVisitorBase::GetVisitorId(map); | 6156 return StaticVisitorBase::GetVisitorId(map); |
6157 } | 6157 } |
6158 | 6158 |
6159 } // namespace internal | 6159 } // namespace internal |
6160 } // namespace v8 | 6160 } // namespace v8 |
OLD | NEW |