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

Side by Side Diff: third_party/WebKit/Source/wtf/Partitions.h

Issue 1652983005: Remove Enumeration Histograms from the Blink Platform API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_blink_histograms_5a
Patch Set: Fix misplaced bracket on android Created 4 years, 10 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "wtf/PartitionAlloc.h" 34 #include "wtf/PartitionAlloc.h"
35 #include "wtf/WTF.h" 35 #include "wtf/WTF.h"
36 #include "wtf/WTFExport.h" 36 #include "wtf/WTFExport.h"
37 #include <string.h> 37 #include <string.h>
38 38
39 namespace WTF { 39 namespace WTF {
40 40
41 class WTF_EXPORT Partitions { 41 class WTF_EXPORT Partitions {
42 public: 42 public:
43 typedef void (*MaxObservedSizeFunction)(size_t sample);
haraken 2016/02/03 00:37:57 Remove |sample|.
haraken 2016/02/03 00:37:57 ReportPartitionAllocSizeFunction ?
dtapuska 2016/02/03 14:43:11 Done.
dtapuska 2016/02/03 14:43:11 Done.
44
43 // Name of allocator used by tracing for marking sub-allocations while take 45 // Name of allocator used by tracing for marking sub-allocations while take
44 // memory snapshots. 46 // memory snapshots.
45 static const char* const kAllocatedObjectPoolName; 47 static const char* const kAllocatedObjectPoolName;
46 48
47 static void initialize(HistogramEnumerationFunction); 49 static void initialize(MaxObservedSizeFunction);
48 static void shutdown(); 50 static void shutdown();
49 ALWAYS_INLINE static PartitionRootGeneric* bufferPartition() 51 ALWAYS_INLINE static PartitionRootGeneric* bufferPartition()
50 { 52 {
51 ASSERT(s_initialized); 53 ASSERT(s_initialized);
52 return m_bufferAllocator.root(); 54 return m_bufferAllocator.root();
53 } 55 }
54 56
55 ALWAYS_INLINE static PartitionRootGeneric* fastMallocPartition() 57 ALWAYS_INLINE static PartitionRootGeneric* fastMallocPartition()
56 { 58 {
57 ASSERT(s_initialized); 59 ASSERT(s_initialized);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // risk where the length and/or the contents are exploited from user 155 // risk where the length and/or the contents are exploited from user
154 // scripts. Vectors, HashTables, ArrayBufferContents and Strings are 156 // scripts. Vectors, HashTables, ArrayBufferContents and Strings are
155 // allocated in the buffer partition. 157 // allocated in the buffer partition.
156 // - Fast malloc partition: A partition to allocate all other objects. 158 // - Fast malloc partition: A partition to allocate all other objects.
157 static PartitionAllocatorGeneric m_fastMallocAllocator; 159 static PartitionAllocatorGeneric m_fastMallocAllocator;
158 static PartitionAllocatorGeneric m_bufferAllocator; 160 static PartitionAllocatorGeneric m_bufferAllocator;
159 #if !ENABLE(OILPAN) 161 #if !ENABLE(OILPAN)
160 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator; 162 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator;
161 #endif 163 #endif
162 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator; 164 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator;
163 static HistogramEnumerationFunction m_histogramEnumeration; 165 static MaxObservedSizeFunction m_maxSizeFunction;
164 }; 166 };
165 167
166 } // namespace WTF 168 } // namespace WTF
167 169
168 #endif // Partitions_h 170 #endif // Partitions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698