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

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

Issue 1349183002: [tracing] Rename WebMemoryDumpLevelOfDetail enums to match chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('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 "platform/PartitionAllocMemoryDumpProvider.h" 6 #include "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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 bool PartitionAllocMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail l evelOfDetail, WebProcessMemoryDump* memoryDump) 93 bool PartitionAllocMemoryDumpProvider::onMemoryDump(WebMemoryDumpLevelOfDetail l evelOfDetail, WebProcessMemoryDump* memoryDump)
94 { 94 {
95 PartitionStatsDumperImpl partitionStatsDumper(memoryDump, levelOfDetail); 95 PartitionStatsDumperImpl partitionStatsDumper(memoryDump, levelOfDetail);
96 96
97 WebMemoryAllocatorDump* partitionsDump = memoryDump->createMemoryAllocatorDu mp( 97 WebMemoryAllocatorDump* partitionsDump = memoryDump->createMemoryAllocatorDu mp(
98 String::format("%s/%s", kPartitionAllocDumpName, kPartitionsDumpName)); 98 String::format("%s/%s", kPartitionAllocDumpName, kPartitionsDumpName));
99 99
100 // This method calls memoryStats.partitionsDumpBucketStats with memory stati stics. 100 // This method calls memoryStats.partitionsDumpBucketStats with memory stati stics.
101 WTF::Partitions::dumpMemoryStats(levelOfDetail == WebMemoryDumpLevelOfDetail ::Low, &partitionStatsDumper); 101 WTF::Partitions::dumpMemoryStats(levelOfDetail == WebMemoryDumpLevelOfDetail ::Light, &partitionStatsDumper);
102 102
103 WebMemoryAllocatorDump* allocatedObjectsDump = memoryDump->createMemoryAlloc atorDump( 103 WebMemoryAllocatorDump* allocatedObjectsDump = memoryDump->createMemoryAlloc atorDump(
104 String::format("%s/allocated_objects", kPartitionAllocDumpName)); 104 String::format("%s/allocated_objects", kPartitionAllocDumpName));
105 allocatedObjectsDump->AddScalar("size", "bytes", partitionStatsDumper.totalA ctiveBytes()); 105 allocatedObjectsDump->AddScalar("size", "bytes", partitionStatsDumper.totalA ctiveBytes());
106 memoryDump->AddOwnershipEdge(allocatedObjectsDump->guid(), partitionsDump->g uid()); 106 memoryDump->AddOwnershipEdge(allocatedObjectsDump->guid(), partitionsDump->g uid());
107 107
108 return true; 108 return true;
109 } 109 }
110 110
111 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() 111 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider()
112 { 112 {
113 } 113 }
114 114
115 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() 115 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider()
116 { 116 {
117 } 117 }
118 118
119 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/heap/BlinkGCMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698