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

Unified Diff: third_party/WebKit/Source/platform/heap/HeapCompact.cpp

Issue 2769113003: Allow safe per-thread heap compaction UMA reporting. (Closed)
Patch Set: update initializers Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698