| 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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 event.type = MemoryReducer::kMarkCompact; | 1010 event.type = MemoryReducer::kMarkCompact; |
| 1011 event.time_ms = MonotonicallyIncreasingTimeInMs(); | 1011 event.time_ms = MonotonicallyIncreasingTimeInMs(); |
| 1012 // Trigger one more GC if | 1012 // Trigger one more GC if |
| 1013 // - this GC decreased committed memory, | 1013 // - this GC decreased committed memory, |
| 1014 // - there is high fragmentation, | 1014 // - there is high fragmentation, |
| 1015 // - there are live detached contexts. | 1015 // - there are live detached contexts. |
| 1016 event.next_gc_likely_to_collect_more = | 1016 event.next_gc_likely_to_collect_more = |
| 1017 (committed_memory_before - committed_memory_after) > MB || | 1017 (committed_memory_before - committed_memory_after) > MB || |
| 1018 HasHighFragmentation(used_memory_after, committed_memory_after) || | 1018 HasHighFragmentation(used_memory_after, committed_memory_after) || |
| 1019 (detached_contexts()->length() > 0); | 1019 (detached_contexts()->length() > 0); |
| 1020 event.committed_memory = committed_memory_after; | |
| 1021 if (deserialization_complete_) { | 1020 if (deserialization_complete_) { |
| 1022 memory_reducer_->NotifyMarkCompact(event); | 1021 memory_reducer_->NotifyMarkCompact(event); |
| 1023 } | 1022 } |
| 1024 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); | 1023 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); |
| 1025 } | 1024 } |
| 1026 | 1025 |
| 1027 tracer()->Stop(collector); | 1026 tracer()->Stop(collector); |
| 1028 } | 1027 } |
| 1029 | 1028 |
| 1030 if (collector == MARK_COMPACTOR && | 1029 if (collector == MARK_COMPACTOR && |
| (...skipping 5455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6486 } | 6485 } |
| 6487 | 6486 |
| 6488 | 6487 |
| 6489 // static | 6488 // static |
| 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6489 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6491 return StaticVisitorBase::GetVisitorId(map); | 6490 return StaticVisitorBase::GetVisitorId(map); |
| 6492 } | 6491 } |
| 6493 | 6492 |
| 6494 } // namespace internal | 6493 } // namespace internal |
| 6495 } // namespace v8 | 6494 } // namespace v8 |
| OLD | NEW |