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

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

Issue 1165703010: PartitionAlloc: improve how statistics appear in chrome://tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git cl try 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 24 matching lines...) Expand all
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("0slot_size", "bytes", memoryStats->bucketSlotSize) ;
Primiano Tucci (use gerrit) 2015/06/06 16:00:37 Hmmm I see that you want to enforce ordering and u
46 allocatorDump->AddScalar("partition_page_size", "bytes", memoryStats->alloca tedPageSize); 46 allocatorDump->AddScalar("1active_size", "bytes", memoryStats->activeBytes);
47 allocatorDump->AddScalar("freeable_size", "bytes", memoryStats->freeableByte s); 47 allocatorDump->AddScalar("2resident_size", "bytes", memoryStats->residentByt es);
48 allocatorDump->AddScalar("full_partition_pages", "objects", memoryStats->num FullPages); 48 allocatorDump->AddScalar("3freeable_size", "bytes", memoryStats->freeableByt es);
49 allocatorDump->AddScalar("active_partition_pages", "objects", memoryStats->n umActivePages); 49 allocatorDump->AddScalar("4num_active", "objects", memoryStats->numActivePag es);
50 allocatorDump->AddScalar("empty_partition_pages", "objects", memoryStats->nu mEmptyPages); 50 allocatorDump->AddScalar("5num_full", "objects", memoryStats->numFullPages);
51 allocatorDump->AddScalar("decommitted_partition_pages", "objects", memorySta ts->numDecommittedPages); 51 allocatorDump->AddScalar("6num_empty", "objects", memoryStats->numEmptyPages );
52 allocatorDump->AddScalar("7num_decommitted", "objects", memoryStats->numDeco mmittedPages);
53 allocatorDump->AddScalar("8page_size", "bytes", memoryStats->allocatedPageSi ze);
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
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
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