Have scrollperf logging log information about wheel event handlers
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 01:18:37 +0000 (01:18 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 01:18:37 +0000 (01:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=107761
<rdar://problem/12281015>

Reviewed by Tim Horton.

Log when the wheel event handler count of a ScrollingTreeScrollingNodeMac changes.

* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::update):
(WebCore::logWheelEventHandlerCountChanged):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@140617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm

index f0746bc..608c3d2 100644 (file)
@@ -1,3 +1,17 @@
+2013-01-23  Simon Fraser  <simon.fraser@apple.com>
+
+        Have scrollperf logging log information about wheel event handlers
+        https://bugs.webkit.org/show_bug.cgi?id=107761
+        <rdar://problem/12281015>
+
+        Reviewed by Tim Horton.
+
+        Log when the wheel event handler count of a ScrollingTreeScrollingNodeMac changes.
+
+        * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeScrollingNodeMac::update):
+        (WebCore::logWheelEventHandlerCountChanged):
+
 2013-01-23  Kentaro Hara  <haraken@chromium.org>
 
         [V8] Add an optional Isolate parameter to GetTemplate() and GetRawTemplate()
index 00a6e15..663c734 100644 (file)
@@ -44,6 +44,8 @@
 namespace WebCore {
 
 static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons);
+static void logWheelEventHandlerCountChanged(unsigned);
+
 
 PassOwnPtr<ScrollingTreeScrollingNode> ScrollingTreeScrollingNode::create(ScrollingTree* scrollingTree)
 {
@@ -97,6 +99,11 @@ void ScrollingTreeScrollingNodeMac::update(ScrollingStateNode* stateNode)
         if (scrollingTree()->scrollingPerformanceLoggingEnabled())
             logThreadedScrollingMode(mainThreadScrollingReasons);
     }
+
+    if ((state->changedProperties() & ScrollingStateScrollingNode::WheelEventHandlerCount)) {
+        if (scrollingTree()->scrollingPerformanceLoggingEnabled())
+            logWheelEventHandlerCountChanged(state->wheelEventHandlerCount());
+    }
 }
 
 void ScrollingTreeScrollingNodeMac::handleWheelEvent(const PlatformWheelEvent& wheelEvent)
@@ -396,6 +403,11 @@ static void logThreadedScrollingMode(unsigned mainThreadScrollingReasons)
         WTFLogAlways("SCROLLING: Switching to threaded scrolling mode. Time: %f\n", WTF::monotonicallyIncreasingTime());
 }
 
+void logWheelEventHandlerCountChanged(unsigned count)
+{
+    WTFLogAlways("SCROLLING: Wheel event handler count changed. Time: %f Count: %u\n", WTF::monotonicallyIncreasingTime(), count);
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(THREADED_SCROLLING)