Index: third_party/WebKit/Source/platform/heap/HeapCompact.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp |
index 995a7d81ee7da83caecf3a89a4a87cc1c74d825c..9aee638ead8caf4a85f113db381f1a5d9820562b 100644 |
--- a/third_party/WebKit/Source/platform/heap/HeapCompact.cpp |
+++ b/third_party/WebKit/Source/platform/heap/HeapCompact.cpp |
@@ -428,14 +428,17 @@ void HeapCompact::finishThreadCompaction() { |
m_doCompact = false; |
double timeForHeapCompaction = WTF::currentTimeMS() - m_startCompactionTimeMS; |
- DEFINE_STATIC_LOCAL(CustomCountHistogram, timeForHeapCompactionHistogram, |
- ("BlinkGC.TimeForHeapCompaction", 1, 10 * 1000, 50)); |
+ DEFINE_THREAD_SAFE_STATIC_LOCAL( |
+ CustomCountHistogram, timeForHeapCompactionHistogram, |
+ new CustomCountHistogram("BlinkGC.TimeForHeapCompaction", 1, 10 * 1000, |
+ 50)); |
timeForHeapCompactionHistogram.count(timeForHeapCompaction); |
m_startCompactionTimeMS = 0; |
- DEFINE_STATIC_LOCAL( |
+ DEFINE_THREAD_SAFE_STATIC_LOCAL( |
CustomCountHistogram, objectSizeFreedByHeapCompaction, |
- ("BlinkGC.ObjectSizeFreedByHeapCompaction", 1, 4 * 1024 * 1024, 50)); |
+ new CustomCountHistogram("BlinkGC.ObjectSizeFreedByHeapCompaction", 1, |
+ 4 * 1024 * 1024, 50)); |
objectSizeFreedByHeapCompaction.count(m_freedSize / 1024); |
#if DEBUG_LOG_HEAP_COMPACTION_RUNNING_TIME |