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

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

Issue 1391933004: [Tracing] Add hook to PartitionAlloc for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address primiano comments Created 5 years, 2 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
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 } 108 }
109 109
110 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider() 110 PartitionAllocMemoryDumpProvider::PartitionAllocMemoryDumpProvider()
111 { 111 {
112 } 112 }
113 113
114 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider() 114 PartitionAllocMemoryDumpProvider::~PartitionAllocMemoryDumpProvider()
115 { 115 {
116 } 116 }
117 117
118 void PartitionAllocMemoryDumpProvider::onHeapProfilingEnabled(AllocationHook* al locationHook, FreeHook* freeHook)
119 {
120 // Make PartitionAlloc call |allocationHook| and |freeHook| for every
121 // subsequent allocation and free (or not if the pointers are null).
122 PartitionAllocHooks::setAllocationHook(allocationHook);
123 PartitionAllocHooks::setFreeHook(freeHook);
124 }
125
118 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698