| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "platform/heap/Heap.h" | 31 #include "platform/heap/Heap.h" |
| 32 | 32 |
| 33 #include "base/sys_info.h" |
| 33 #include "platform/Histogram.h" | 34 #include "platform/Histogram.h" |
| 34 #include "platform/ScriptForbiddenScope.h" | 35 #include "platform/ScriptForbiddenScope.h" |
| 35 #include "platform/TraceEvent.h" | 36 #include "platform/TraceEvent.h" |
| 36 #include "platform/heap/BlinkGCMemoryDumpProvider.h" | 37 #include "platform/heap/BlinkGCMemoryDumpProvider.h" |
| 37 #include "platform/heap/CallbackStack.h" | 38 #include "platform/heap/CallbackStack.h" |
| 38 #include "platform/heap/MarkingVisitor.h" | 39 #include "platform/heap/MarkingVisitor.h" |
| 39 #include "platform/heap/PageMemory.h" | 40 #include "platform/heap/PageMemory.h" |
| 40 #include "platform/heap/PagePool.h" | 41 #include "platform/heap/PagePool.h" |
| 41 #include "platform/heap/SafePoint.h" | 42 #include "platform/heap/SafePoint.h" |
| 42 #include "platform/heap/ThreadState.h" | 43 #include "platform/heap/ThreadState.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 s_allocatedSpace = 0; | 168 s_allocatedSpace = 0; |
| 168 s_allocatedObjectSize = 0; | 169 s_allocatedObjectSize = 0; |
| 169 s_objectSizeAtLastGC = 0; | 170 s_objectSizeAtLastGC = 0; |
| 170 s_markedObjectSize = 0; | 171 s_markedObjectSize = 0; |
| 171 s_markedObjectSizeAtLastCompleteSweep = 0; | 172 s_markedObjectSizeAtLastCompleteSweep = 0; |
| 172 s_wrapperCount = 0; | 173 s_wrapperCount = 0; |
| 173 s_wrapperCountAtLastGC = 0; | 174 s_wrapperCountAtLastGC = 0; |
| 174 s_collectedWrapperCount = 0; | 175 s_collectedWrapperCount = 0; |
| 175 s_partitionAllocSizeAtLastGC = WTF::Partitions::totalSizeOfCommittedPages(); | 176 s_partitionAllocSizeAtLastGC = WTF::Partitions::totalSizeOfCommittedPages(); |
| 176 s_estimatedMarkingTimePerByte = 0.0; | 177 s_estimatedMarkingTimePerByte = 0.0; |
| 178 s_isLowEndDevice = base::SysInfo::IsLowEndDevice(); |
| 177 #if ENABLE(ASSERT) | 179 #if ENABLE(ASSERT) |
| 178 s_gcGeneration = 1; | 180 s_gcGeneration = 1; |
| 179 #endif | 181 #endif |
| 180 | 182 |
| 181 GCInfoTable::init(); | 183 GCInfoTable::init(); |
| 182 | 184 |
| 183 if (Platform::current() && Platform::current()->currentThread()) | 185 if (Platform::current() && Platform::current()->currentThread()) |
| 184 Platform::current()->registerMemoryDumpProvider(BlinkGCMemoryDumpProvide
r::instance(), "BlinkGC"); | 186 Platform::current()->registerMemoryDumpProvider(BlinkGCMemoryDumpProvide
r::instance(), "BlinkGC"); |
| 185 } | 187 } |
| 186 | 188 |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 size_t Heap::s_allocatedSpace = 0; | 720 size_t Heap::s_allocatedSpace = 0; |
| 719 size_t Heap::s_allocatedObjectSize = 0; | 721 size_t Heap::s_allocatedObjectSize = 0; |
| 720 size_t Heap::s_objectSizeAtLastGC = 0; | 722 size_t Heap::s_objectSizeAtLastGC = 0; |
| 721 size_t Heap::s_markedObjectSize = 0; | 723 size_t Heap::s_markedObjectSize = 0; |
| 722 size_t Heap::s_markedObjectSizeAtLastCompleteSweep = 0; | 724 size_t Heap::s_markedObjectSizeAtLastCompleteSweep = 0; |
| 723 size_t Heap::s_wrapperCount = 0; | 725 size_t Heap::s_wrapperCount = 0; |
| 724 size_t Heap::s_wrapperCountAtLastGC = 0; | 726 size_t Heap::s_wrapperCountAtLastGC = 0; |
| 725 size_t Heap::s_collectedWrapperCount = 0; | 727 size_t Heap::s_collectedWrapperCount = 0; |
| 726 size_t Heap::s_partitionAllocSizeAtLastGC = 0; | 728 size_t Heap::s_partitionAllocSizeAtLastGC = 0; |
| 727 double Heap::s_estimatedMarkingTimePerByte = 0.0; | 729 double Heap::s_estimatedMarkingTimePerByte = 0.0; |
| 730 bool Heap::s_isLowEndDevice = false; |
| 728 #if ENABLE(ASSERT) | 731 #if ENABLE(ASSERT) |
| 729 uint16_t Heap::s_gcGeneration = 0; | 732 uint16_t Heap::s_gcGeneration = 0; |
| 730 #endif | 733 #endif |
| 731 | 734 |
| 732 } // namespace blink | 735 } // namespace blink |
| OLD | NEW |