| 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/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 event.type = MemoryReducer::kMarkCompact; | 1006 event.type = MemoryReducer::kMarkCompact; |
| 1007 event.time_ms = MonotonicallyIncreasingTimeInMs(); | 1007 event.time_ms = MonotonicallyIncreasingTimeInMs(); |
| 1008 // Trigger one more GC if | 1008 // Trigger one more GC if |
| 1009 // - this GC decreased committed memory, | 1009 // - this GC decreased committed memory, |
| 1010 // - there is high fragmentation, | 1010 // - there is high fragmentation, |
| 1011 // - there are live detached contexts. | 1011 // - there are live detached contexts. |
| 1012 event.next_gc_likely_to_collect_more = | 1012 event.next_gc_likely_to_collect_more = |
| 1013 (committed_memory_before > committed_memory_after + MB) || | 1013 (committed_memory_before > committed_memory_after + MB) || |
| 1014 HasHighFragmentation(used_memory_after, committed_memory_after) || | 1014 HasHighFragmentation(used_memory_after, committed_memory_after) || |
| 1015 (detached_contexts()->length() > 0); | 1015 (detached_contexts()->length() > 0); |
| 1016 event.committed_memory = committed_memory_after; |
| 1016 if (deserialization_complete_) { | 1017 if (deserialization_complete_) { |
| 1017 memory_reducer_->NotifyMarkCompact(event); | 1018 memory_reducer_->NotifyMarkCompact(event); |
| 1018 } | 1019 } |
| 1019 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); | 1020 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); |
| 1020 } | 1021 } |
| 1021 | 1022 |
| 1022 tracer()->Stop(collector); | 1023 tracer()->Stop(collector); |
| 1023 } | 1024 } |
| 1024 | 1025 |
| 1025 if (collector == MARK_COMPACTOR && | 1026 if (collector == MARK_COMPACTOR && |
| (...skipping 5432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6458 } | 6459 } |
| 6459 | 6460 |
| 6460 | 6461 |
| 6461 // static | 6462 // static |
| 6462 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6463 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6463 return StaticVisitorBase::GetVisitorId(map); | 6464 return StaticVisitorBase::GetVisitorId(map); |
| 6464 } | 6465 } |
| 6465 | 6466 |
| 6466 } // namespace internal | 6467 } // namespace internal |
| 6467 } // namespace v8 | 6468 } // namespace v8 |
| OLD | NEW |