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

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

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: Rebase two new histograms were added today 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 1b25eaf1ab2a3b339b19f36b246fb659b13363f1..2722570e03b57ce1daa632727c86c2dfd9b09fee 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -460,7 +460,9 @@ void Heap::collectGarbage(BlinkGC::StackState stackState, BlinkGC::GCType gcType
totalObjectSpaceHistogram.count(Heap::allocatedObjectSize() / 1024);
DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, totalAllocatedSpaceHistogram, new CustomCountHistogram("BlinkGC.TotalAllocatedSpace", 0, 4 * 1024 * 1024, 50));
totalAllocatedSpaceHistogram.count(Heap::allocatedSpace() / 1024);
- Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, BlinkGC::NumberOfGCReason);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, gcReasonHistogram, new EnumerationHistogram("BlinkGC.GCReason", BlinkGC::NumberOfGCReason));
+ gcReasonHistogram.count(reason);
+
Heap::reportMemoryUsageHistogram();
WTF::Partitions::reportMemoryUsageHistogram();
@@ -611,7 +613,8 @@ void Heap::reportMemoryUsageHistogram()
if (sizeInMB > observedMaxSizeInMB) {
// Send a UseCounter only when we see the highest memory usage
// we've ever seen.
- Platform::current()->histogramEnumeration("BlinkGC.CommittedSize", sizeInMB, supportedMaxSizeInMB);
+ DEFINE_THREAD_SAFE_STATIC_LOCAL(EnumerationHistogram, commitedSizeHistogram, new EnumerationHistogram("BlinkGC.CommittedSize", supportedMaxSizeInMB));
+ commitedSizeHistogram.count(sizeInMB);
observedMaxSizeInMB = sizeInMB;
}
}

Powered by Google App Engine
This is Rietveld 408576698