| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 "platform/heap/HeapCompact.h" | 5 #include "platform/heap/HeapCompact.h" |
| 6 | 6 |
| 7 #include "platform/Histogram.h" | 7 #include "platform/Histogram.h" |
| 8 #include "platform/RuntimeEnabledFeatures.h" | 8 #include "platform/RuntimeEnabledFeatures.h" |
| 9 #include "platform/heap/Heap.h" | 9 #include "platform/heap/Heap.h" |
| 10 #include "platform/heap/SparseHeapBitmap.h" | 10 #include "platform/heap/SparseHeapBitmap.h" |
| 11 #include "wtf/CurrentTime.h" | 11 #include "platform/wtf/CurrentTime.h" |
| 12 #include "wtf/HashMap.h" | 12 #include "platform/wtf/HashMap.h" |
| 13 #include "wtf/HashSet.h" | 13 #include "platform/wtf/HashSet.h" |
| 14 #include "wtf/Vector.h" | 14 #include "platform/wtf/Vector.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 bool HeapCompact::s_forceCompactionGC = false; | 18 bool HeapCompact::s_forceCompactionGC = false; |
| 19 | 19 |
| 20 // The real worker behind heap compaction, recording references to movable | 20 // The real worker behind heap compaction, recording references to movable |
| 21 // objects ("slots".) When the objects end up being compacted and moved, | 21 // objects ("slots".) When the objects end up being compacted and moved, |
| 22 // relocate() will adjust the slots to point to the new location of the | 22 // relocate() will adjust the slots to point to the new location of the |
| 23 // object along with handling fixups for interior pointers. | 23 // object along with handling fixups for interior pointers. |
| 24 // | 24 // |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 fixups().addCompactingPage(page); | 457 fixups().addCompactingPage(page); |
| 458 } | 458 } |
| 459 | 459 |
| 460 bool HeapCompact::scheduleCompactionGCForTesting(bool value) { | 460 bool HeapCompact::scheduleCompactionGCForTesting(bool value) { |
| 461 bool current = s_forceCompactionGC; | 461 bool current = s_forceCompactionGC; |
| 462 s_forceCompactionGC = value; | 462 s_forceCompactionGC = value; |
| 463 return current; | 463 return current; |
| 464 } | 464 } |
| 465 | 465 |
| 466 } // namespace blink | 466 } // namespace blink |
| OLD | NEW |