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

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

Issue 1366203002: Add dump name for tracing in PartitionAlloc for sub-allocations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web_cache
Patch Set: Just adding pool name. 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 /* 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 21 matching lines...) Expand all
32 #define Partitions_h 32 #define Partitions_h
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 37
38 namespace WTF { 38 namespace WTF {
39 39
40 class WTF_EXPORT Partitions { 40 class WTF_EXPORT Partitions {
41 public: 41 public:
42 // Name of allocator used by tracing for marking sub-allocations while take
43 // memory snapshots.
44 static const char* const kAllocatedObjectPoolName;
45
42 static void initialize(); 46 static void initialize();
43 // TODO(bashi): Remove this function and make initialize() take 47 // TODO(bashi): Remove this function and make initialize() take
44 // HistogramEnumerationFunction when we can make sure that WTF::initialize() 48 // HistogramEnumerationFunction when we can make sure that WTF::initialize()
45 // is called before using this class. 49 // is called before using this class.
46 static void setHistogramEnumeration(HistogramEnumerationFunction); 50 static void setHistogramEnumeration(HistogramEnumerationFunction);
47 static void shutdown(); 51 static void shutdown();
48 ALWAYS_INLINE static PartitionRootGeneric* bufferPartition() 52 ALWAYS_INLINE static PartitionRootGeneric* bufferPartition()
49 { 53 {
50 // TODO(haraken): This check is needed because some call sites allocate 54 // TODO(haraken): This check is needed because some call sites allocate
51 // Blink things before WTF::initialize(). We should fix those call sites 55 // Blink things before WTF::initialize(). We should fix those call sites
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 static PartitionAllocatorGeneric m_fastMallocAllocator; 145 static PartitionAllocatorGeneric m_fastMallocAllocator;
142 static PartitionAllocatorGeneric m_bufferAllocator; 146 static PartitionAllocatorGeneric m_bufferAllocator;
143 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator; 147 static SizeSpecificPartitionAllocator<3328> m_nodeAllocator;
144 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator; 148 static SizeSpecificPartitionAllocator<1024> m_layoutAllocator;
145 static HistogramEnumerationFunction m_histogramEnumeration; 149 static HistogramEnumerationFunction m_histogramEnumeration;
146 }; 150 };
147 151
148 } // namespace WTF 152 } // namespace WTF
149 153
150 #endif // Partitions_h 154 #endif // Partitions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698