| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "config.h" | 5 #include "config.h" |
| 6 #include "Source/platform/PartitionAllocMemoryDumpProvider.h" | 6 #include "Source/platform/PartitionAllocMemoryDumpProvider.h" |
| 7 | 7 |
| 8 #include "public/platform/WebMemoryAllocatorDump.h" | 8 #include "public/platform/WebMemoryAllocatorDump.h" |
| 9 #include "public/platform/WebProcessMemoryDump.h" | 9 #include "public/platform/WebProcessMemoryDump.h" |
| 10 #include "wtf/Partitions.h" | 10 #include "wtf/Partitions.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 { | 35 { |
| 36 ASSERT(memoryStats->isValid); | 36 ASSERT(memoryStats->isValid); |
| 37 String dumpName; | 37 String dumpName; |
| 38 if (memoryStats->isDirectMap) | 38 if (memoryStats->isDirectMap) |
| 39 dumpName = String::format("partition_alloc/%s/directMap_%zu", partitionN
ame, ++m_uid); | 39 dumpName = String::format("partition_alloc/%s/directMap_%zu", partitionN
ame, ++m_uid); |
| 40 else | 40 else |
| 41 dumpName = String::format("partition_alloc/%s/bucket_%zu", partitionName
, static_cast<size_t>(memoryStats->bucketSlotSize)); | 41 dumpName = String::format("partition_alloc/%s/bucket_%zu", partitionName
, static_cast<size_t>(memoryStats->bucketSlotSize)); |
| 42 | 42 |
| 43 WebMemoryAllocatorDump* allocatorDump = m_memoryDump->createMemoryAllocatorD
ump(dumpName); | 43 WebMemoryAllocatorDump* allocatorDump = m_memoryDump->createMemoryAllocatorD
ump(dumpName); |
| 44 allocatorDump->AddScalar("size", "bytes", memoryStats->residentBytes); | 44 allocatorDump->AddScalar("size", "bytes", memoryStats->residentBytes); |
| 45 allocatorDump->AddScalar("waste_size", "bytes", memoryStats->pageWasteSize); | 45 allocatorDump->AddScalar("slot_size", "bytes", memoryStats->bucketSlotSize); |
| 46 allocatorDump->AddScalar("partition_page_size", "bytes", memoryStats->alloca
tedPageSize); | 46 allocatorDump->AddScalar("active_size", "bytes", memoryStats->activeBytes); |
| 47 allocatorDump->AddScalar("resident_size", "bytes", memoryStats->residentByte
s); |
| 47 allocatorDump->AddScalar("freeable_size", "bytes", memoryStats->freeableByte
s); | 48 allocatorDump->AddScalar("freeable_size", "bytes", memoryStats->freeableByte
s); |
| 48 allocatorDump->AddScalar("full_partition_pages", "objects", memoryStats->num
FullPages); | 49 allocatorDump->AddScalar("num_active", "objects", memoryStats->numActivePage
s); |
| 49 allocatorDump->AddScalar("active_partition_pages", "objects", memoryStats->n
umActivePages); | 50 allocatorDump->AddScalar("num_full", "objects", memoryStats->numFullPages); |
| 50 allocatorDump->AddScalar("empty_partition_pages", "objects", memoryStats->nu
mEmptyPages); | 51 allocatorDump->AddScalar("num_empty", "objects", memoryStats->numEmptyPages)
; |
| 51 allocatorDump->AddScalar("decommitted_partition_pages", "objects", memorySta
ts->numDecommittedPages); | 52 allocatorDump->AddScalar("num_decommitted", "objects", memoryStats->numDecom
mittedPages); |
| 53 allocatorDump->AddScalar("page_size", "bytes", memoryStats->allocatedPageSiz
e); |
| 52 | 54 |
| 53 dumpName = dumpName + "/allocated_objects"; | 55 dumpName = dumpName + "/allocated_objects"; |
| 54 WebMemoryAllocatorDump* objectsDump = m_memoryDump->createMemoryAllocatorDum
p(dumpName); | 56 WebMemoryAllocatorDump* objectsDump = m_memoryDump->createMemoryAllocatorDum
p(dumpName); |
| 55 objectsDump->AddScalar("size", "bytes", memoryStats->activeBytes); | 57 objectsDump->AddScalar("size", "bytes", memoryStats->activeBytes); |
| 56 } | 58 } |
| 57 | 59 |
| 58 } // namespace | 60 } // namespace |
| 59 | 61 |
| 60 PartitionAllocMemoryDumpProvider* PartitionAllocMemoryDumpProvider::instance() | 62 PartitionAllocMemoryDumpProvider* PartitionAllocMemoryDumpProvider::instance() |
| 61 { | 63 { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 74 | 76 |
| 75 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() | 77 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() |
| 76 { | 78 { |
| 77 } | 79 } |
| 78 | 80 |
| 79 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() | 81 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() |
| 80 { | 82 { |
| 81 } | 83 } |
| 82 | 84 |
| 83 } // namespace blink | 85 } // namespace blink |
| OLD | NEW |