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

Side by Side Diff: Source/platform/heap/BlinkGCMemoryDumpProvider.cpp

Issue 1161953003: [tracing] Change outer/inner size repr. in memory dumps (blink side) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: WAR string + operator overload 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 | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | no next file » | 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/heap/BlinkGCMemoryDumpProvider.h" 6 #include "Source/platform/heap/BlinkGCMemoryDumpProvider.h"
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "public/platform/WebMemoryAllocatorDump.h" 9 #include "public/platform/WebMemoryAllocatorDump.h"
10 #include "public/platform/WebProcessMemoryDump.h" 10 #include "public/platform/WebProcessMemoryDump.h"
11 #include "wtf/StdLibExtras.h" 11 #include "wtf/StdLibExtras.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 BlinkGCMemoryDumpProvider* BlinkGCMemoryDumpProvider::instance() 15 BlinkGCMemoryDumpProvider* BlinkGCMemoryDumpProvider::instance()
16 { 16 {
17 DEFINE_STATIC_LOCAL(BlinkGCMemoryDumpProvider, instance, ()); 17 DEFINE_STATIC_LOCAL(BlinkGCMemoryDumpProvider, instance, ());
18 return &instance; 18 return &instance;
19 } 19 }
20 20
21 bool BlinkGCMemoryDumpProvider::onMemoryDump(blink::WebProcessMemoryDump* memory Dump) 21 bool BlinkGCMemoryDumpProvider::onMemoryDump(blink::WebProcessMemoryDump* memory Dump)
22 { 22 {
23 WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDum p("blink_gc"); 23 WebMemoryAllocatorDump* allocatorDump = memoryDump->createMemoryAllocatorDum p("blink_gc");
24 allocatorDump->AddScalar("inner_size", "bytes", Heap::allocatedObjectSize()) ; 24 allocatorDump->AddScalar("size", "bytes", Heap::allocatedSpace());
25 allocatorDump->AddScalar("outer_size", "bytes", Heap::allocatedSpace()); 25
26 allocatorDump->AddScalar("estimated_live_object_size", "bytes", Heap::estima tedLiveObjectSize()); 26 WebMemoryAllocatorDump* objectsDump = memoryDump->createMemoryAllocatorDump( "blink_gc/allocated_objects");
27 objectsDump->AddScalar("size", "bytes", Heap::allocatedObjectSize());
28 objectsDump->AddScalar("estimated_live_object_size", "bytes", Heap::estimate dLiveObjectSize());
29
27 return true; 30 return true;
28 } 31 }
29 32
30 BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider() 33 BlinkGCMemoryDumpProvider::BlinkGCMemoryDumpProvider()
31 { 34 {
32 } 35 }
33 36
34 BlinkGCMemoryDumpProvider::~BlinkGCMemoryDumpProvider() 37 BlinkGCMemoryDumpProvider::~BlinkGCMemoryDumpProvider()
35 { 38 {
36 } 39 }
37 40
38 } // namespace blink 41 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/PartitionAllocMemoryDumpProvider.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698