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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/wtf/Partitions.h
diff --git a/third_party/WebKit/Source/wtf/Partitions.h b/third_party/WebKit/Source/wtf/Partitions.h
index 276380472bd64b9e5beed85d8c9c172309b45d2d..26cba27c280e228567ff370a2216607cadec745e 100644
--- a/third_party/WebKit/Source/wtf/Partitions.h
+++ b/third_party/WebKit/Source/wtf/Partitions.h
@@ -98,6 +98,9 @@ public:
static void dumpMemoryStats(bool isLightDump, PartitionStatsDumper*);
+ static void setAllocatorPoolNameForTracing(const char* name) { m_allocatorPoolNameForTracing = name; }
+ static const char* allocatorPoolNameForTracing() { return m_allocatorPoolNameForTracing; }
+
ALWAYS_INLINE static void* bufferMalloc(size_t n)
{
return partitionAllocGeneric(bufferPartition(), n);
@@ -143,6 +146,9 @@ private:
static SizeSpecificPartitionAllocator<3328> m_nodeAllocator;
static SizeSpecificPartitionAllocator<1024> m_layoutAllocator;
static HistogramEnumerationFunction m_histogramEnumeration;
+
+ // Stores the allocator name used for tracing allocations from the partitions.
+ static const char* m_allocatorPoolNameForTracing;
};
} // namespace WTF

Powered by Google App Engine
This is Rietveld 408576698