Title: [132517] trunk/Source/WebCore
Revision
132517
Author
o...@chromium.org
Date
2012-10-25 12:58:04 -0700 (Thu, 25 Oct 2012)

Log Message

[V8] Add histograms to measure V8 work done during window close and navigation
https://bugs.webkit.org/show_bug.cgi?id=100358

Reviewed by Adam Barth.

* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::clearForClose):
(WebCore::ScriptController::clearWindowShell):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (132516 => 132517)


--- trunk/Source/WebCore/ChangeLog	2012-10-25 19:34:56 UTC (rev 132516)
+++ trunk/Source/WebCore/ChangeLog	2012-10-25 19:58:04 UTC (rev 132517)
@@ -1,3 +1,14 @@
+2012-10-25  Ojan Vafai  <o...@chromium.org>
+
+        [V8] Add histograms to measure V8 work done during window close and navigation
+        https://bugs.webkit.org/show_bug.cgi?id=100358
+
+        Reviewed by Adam Barth.
+
+        * bindings/v8/ScriptController.cpp:
+        (WebCore::ScriptController::clearForClose):
+        (WebCore::ScriptController::clearWindowShell):
+
 2012-10-25  Antti Koivisto  <an...@apple.com>
 
         Avoid unnecessary style recalcs on id attribute mutation.

Modified: trunk/Source/WebCore/bindings/v8/ScriptController.cpp (132516 => 132517)


--- trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2012-10-25 19:34:56 UTC (rev 132516)
+++ trunk/Source/WebCore/bindings/v8/ScriptController.cpp	2012-10-25 19:58:04 UTC (rev 132517)
@@ -40,6 +40,7 @@
 #include "EventNames.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
+#include "HistogramSupport.h"
 #include "InspectorInstrumentation.h"
 #include "NPObjectWrapper.h"
 #include "NPV8Object.h"
@@ -65,6 +66,7 @@
 #include "V8NPObject.h"
 #include "V8RecursionScope.h"
 #include "Widget.h"
+#include <wtf/CurrentTime.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/StringExtras.h>
 #include <wtf/text/CString.h>
@@ -154,8 +156,10 @@
 
 void ScriptController::clearForClose()
 {
+    double start = currentTime();
     reset();
     windowShell()->clearForClose();
+    HistogramSupport::histogramCustomCounts("WebCore.ScriptController.clearForClose", (currentTime() - start) * 1000, 0, 10000, 50);
 }
 
 void ScriptController::updateSecurityOrigin()
@@ -627,10 +631,12 @@
 
 void ScriptController::clearWindowShell(DOMWindow*, bool)
 {
+    double start = currentTime();
     reset();
     // V8 binding expects ScriptController::clearWindowShell only be called
     // when a frame is loading a new page. This creates a new context for the new page.
     windowShell()->clearForNavigation();
+    HistogramSupport::histogramCustomCounts("WebCore.ScriptController.clearWindowShell", (currentTime() - start) * 1000, 0, 10000, 50);
 }
 
 #if ENABLE(INSPECTOR)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to