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

Unified Diff: Source/platform/heap/ThreadState.cpp

Issue 304673003: Add UMAs about Blink GC metrics (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index aaef9c1d8a73899115ae6a0840800578c7e63b0b..a90cf08b118a75a14e8dfe143679e7707143325c 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -35,6 +35,7 @@
#include "platform/heap/AddressSanitizer.h"
#include "platform/heap/Handle.h"
#include "platform/heap/Heap.h"
+#include "public/platform/Platform.h"
#include "wtf/ThreadingPrimitives.h"
#if OS(WIN)
@@ -818,6 +819,7 @@ void ThreadState::performPendingSweep()
return;
TRACE_EVENT0("Blink", "ThreadState::performPendingSweep");
+ double timeStamp = WTF::currentTimeMS();
const char* samplingState = TRACE_EVENT_GET_SAMPLING_STATE();
if (isMainThread())
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "BlinkGCSweeping");
@@ -837,6 +839,10 @@ void ThreadState::performPendingSweep()
clearGCRequested();
clearSweepRequested();
+ if (blink::Platform::current()) {
+ blink::Platform::current()->histogramCustomCounts("BlinkGC.PerformPendingSweep", WTF::currentTimeMS() - timeStamp, 0, 10 * 1000, 50);
+ }
+
if (isMainThread())
TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(samplingState);
}
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698