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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 event.type = MemoryReducer::kMarkCompact; | 1009 event.type = MemoryReducer::kMarkCompact; |
1010 event.time_ms = MonotonicallyIncreasingTimeInMs(); | 1010 event.time_ms = MonotonicallyIncreasingTimeInMs(); |
1011 // Trigger one more GC if | 1011 // Trigger one more GC if |
1012 // - this GC decreased committed memory, | 1012 // - this GC decreased committed memory, |
1013 // - there is high fragmentation, | 1013 // - there is high fragmentation, |
1014 // - there are live detached contexts. | 1014 // - there are live detached contexts. |
1015 event.next_gc_likely_to_collect_more = | 1015 event.next_gc_likely_to_collect_more = |
1016 (committed_memory_before - committed_memory_after) > MB || | 1016 (committed_memory_before - committed_memory_after) > MB || |
1017 HasHighFragmentation(used_memory_after, committed_memory_after) || | 1017 HasHighFragmentation(used_memory_after, committed_memory_after) || |
1018 (detached_contexts()->length() > 0); | 1018 (detached_contexts()->length() > 0); |
| 1019 event.committed_memory = committed_memory_after; |
1019 if (deserialization_complete_) { | 1020 if (deserialization_complete_) { |
1020 memory_reducer_->NotifyMarkCompact(event); | 1021 memory_reducer_->NotifyMarkCompact(event); |
1021 } | 1022 } |
1022 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); | 1023 memory_pressure_level_.SetValue(MemoryPressureLevel::kNone); |
1023 } | 1024 } |
1024 | 1025 |
1025 tracer()->Stop(collector); | 1026 tracer()->Stop(collector); |
1026 } | 1027 } |
1027 | 1028 |
1028 if (collector == MARK_COMPACTOR && | 1029 if (collector == MARK_COMPACTOR && |
(...skipping 5468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6497 } | 6498 } |
6498 | 6499 |
6499 | 6500 |
6500 // static | 6501 // static |
6501 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6502 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6502 return StaticVisitorBase::GetVisitorId(map); | 6503 return StaticVisitorBase::GetVisitorId(map); |
6503 } | 6504 } |
6504 | 6505 |
6505 } // namespace internal | 6506 } // namespace internal |
6506 } // namespace v8 | 6507 } // namespace v8 |
OLD | NEW |