Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Side by Side Diff: Source/platform/PartitionAllocMemoryDumpProvider.cpp

Issue 1190173003: PartitionAlloc: API changes to support new partitionPurgeMemoryGeneric() mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review feedback. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 27 matching lines...) Expand all
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("slot_size", "bytes", memoryStats->bucketSlotSize); 45 allocatorDump->AddScalar("slot_size", "bytes", memoryStats->bucketSlotSize);
46 allocatorDump->AddScalar("active_size", "bytes", memoryStats->activeBytes); 46 allocatorDump->AddScalar("active_size", "bytes", memoryStats->activeBytes);
47 allocatorDump->AddScalar("resident_size", "bytes", memoryStats->residentByte s); 47 allocatorDump->AddScalar("resident_size", "bytes", memoryStats->residentByte s);
48 allocatorDump->AddScalar("freeable_size", "bytes", memoryStats->freeableByte s); 48 allocatorDump->AddScalar("decommittable_size", "bytes", memoryStats->decommi ttableBytes);
49 allocatorDump->AddScalar("discardable_size", "bytes", memoryStats->discardab leBytes);
49 allocatorDump->AddScalar("num_active", "objects", memoryStats->numActivePage s); 50 allocatorDump->AddScalar("num_active", "objects", memoryStats->numActivePage s);
50 allocatorDump->AddScalar("num_full", "objects", memoryStats->numFullPages); 51 allocatorDump->AddScalar("num_full", "objects", memoryStats->numFullPages);
51 allocatorDump->AddScalar("num_empty", "objects", memoryStats->numEmptyPages) ; 52 allocatorDump->AddScalar("num_empty", "objects", memoryStats->numEmptyPages) ;
52 allocatorDump->AddScalar("num_decommitted", "objects", memoryStats->numDecom mittedPages); 53 allocatorDump->AddScalar("num_decommitted", "objects", memoryStats->numDecom mittedPages);
53 allocatorDump->AddScalar("page_size", "bytes", memoryStats->allocatedPageSiz e); 54 allocatorDump->AddScalar("page_size", "bytes", memoryStats->allocatedPageSiz e);
54 55
55 dumpName = dumpName + "/allocated_objects"; 56 dumpName = dumpName + "/allocated_objects";
56 WebMemoryAllocatorDump* objectsDump = m_memoryDump->createMemoryAllocatorDum p(dumpName); 57 WebMemoryAllocatorDump* objectsDump = m_memoryDump->createMemoryAllocatorDum p(dumpName);
57 objectsDump->AddScalar("size", "bytes", memoryStats->activeBytes); 58 objectsDump->AddScalar("size", "bytes", memoryStats->activeBytes);
58 } 59 }
(...skipping 17 matching lines...) Expand all
76 77
77 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() 78 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider()
78 { 79 {
79 } 80 }
80 81
81 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() 82 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider()
82 { 83 {
83 } 84 }
84 85
85 } // namespace blink 86 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/wtf/PartitionAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698