Title: [286537] trunk
Revision
286537
Author
[email protected]
Date
2021-12-05 20:40:19 -0800 (Sun, 05 Dec 2021)

Log Message

Add trace points for generated momentum events
https://bugs.webkit.org/show_bug.cgi?id=233857

Reviewed by Tim Horton.

Source/WebKit:

Add start/end points for synthetic momentum, and a trace point for each generated event.

* WebProcess/WebPage/MomentumEventDispatcher.cpp:
(WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
(WebKit::MomentumEventDispatcher::didStartMomentumPhase):
(WebKit::MomentumEventDispatcher::didEndMomentumPhase):

Source/WTF:

* wtf/SystemTracing.h:

Tools:

Add start/end points for synthetic momentum, and a trace point for each generated event.

* Tracing/SystemTracePoints.plist:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (286536 => 286537)


--- trunk/Source/WTF/ChangeLog	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Source/WTF/ChangeLog	2021-12-06 04:40:19 UTC (rev 286537)
@@ -1,3 +1,12 @@
+2021-12-05  Simon Fraser  <[email protected]>
+
+        Add trace points for generated momentum events
+        https://bugs.webkit.org/show_bug.cgi?id=233857
+
+        Reviewed by Tim Horton.
+
+        * wtf/SystemTracing.h:
+
 2021-12-03  Chris Dumez  <[email protected]>
 
         [WK2] Turn on Web Locks API support

Modified: trunk/Source/WTF/wtf/SystemTracing.h (286536 => 286537)


--- trunk/Source/WTF/wtf/SystemTracing.h	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Source/WTF/wtf/SystemTracing.h	2021-12-06 04:40:19 UTC (rev 286537)
@@ -127,6 +127,9 @@
     RenderServerSnapshotEnd,
     TakeSnapshotStart,
     TakeSnapshotEnd,
+    SyntheticMomentumStart,
+    SyntheticMomentumEnd,
+    SyntheticMomentumEvent,
 
     UIProcessRange = 14000,
     CommitLayerTreeStart,

Modified: trunk/Source/WebKit/ChangeLog (286536 => 286537)


--- trunk/Source/WebKit/ChangeLog	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Source/WebKit/ChangeLog	2021-12-06 04:40:19 UTC (rev 286537)
@@ -1,3 +1,17 @@
+2021-12-05  Simon Fraser  <[email protected]>
+
+        Add trace points for generated momentum events
+        https://bugs.webkit.org/show_bug.cgi?id=233857
+
+        Reviewed by Tim Horton.
+
+        Add start/end points for synthetic momentum, and a trace point for each generated event.
+
+        * WebProcess/WebPage/MomentumEventDispatcher.cpp:
+        (WebKit::MomentumEventDispatcher::dispatchSyntheticMomentumEvent):
+        (WebKit::MomentumEventDispatcher::didStartMomentumPhase):
+        (WebKit::MomentumEventDispatcher::didEndMomentumPhase):
+
 2021-12-04  Myles C. Maxfield  <[email protected]>
 
         Rename DerivedSources/WebKit2 to DerivedSources/WebKit

Modified: trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp (286536 => 286537)


--- trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Source/WebKit/WebProcess/WebPage/MomentumEventDispatcher.cpp	2021-12-06 04:40:19 UTC (rev 286537)
@@ -34,6 +34,7 @@
 #include "WebProcessProxyMessages.h"
 #include <WebCore/DisplayRefreshMonitor.h>
 #include <WebCore/Scrollbar.h>
+#include <wtf/SystemTracing.h>
 
 namespace WebKit {
 
@@ -144,6 +145,8 @@
 
 void MomentumEventDispatcher::dispatchSyntheticMomentumEvent(WebWheelEvent::Phase phase, WebCore::FloatSize delta)
 {
+    tracePoint(SyntheticMomentumEvent, static_cast<uint64_t>(phase), std::abs(delta.width()), std::abs(delta.height()));
+
     ASSERT(m_currentGesture.active);
     ASSERT(m_currentGesture.initiatingEvent);
 
@@ -182,6 +185,8 @@
 
 void MomentumEventDispatcher::didStartMomentumPhase(WebCore::PageIdentifier pageIdentifier, const WebWheelEvent& event)
 {
+    tracePoint(SyntheticMomentumStart);
+
     auto momentumStartInterval = event.ioHIDEventTimestamp() - m_lastEndedEventTimestamp;
 
     m_currentGesture.active = true;
@@ -223,6 +228,7 @@
     stopDisplayLink();
 
     m_currentGesture = { };
+    tracePoint(SyntheticMomentumEnd);
 }
 
 void MomentumEventDispatcher::setScrollingAccelerationCurve(WebCore::PageIdentifier pageIdentifier, std::optional<ScrollingAccelerationCurve> curve)

Modified: trunk/Tools/ChangeLog (286536 => 286537)


--- trunk/Tools/ChangeLog	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Tools/ChangeLog	2021-12-06 04:40:19 UTC (rev 286537)
@@ -1,3 +1,14 @@
+2021-12-05  Simon Fraser  <[email protected]>
+
+        Add trace points for generated momentum events
+        https://bugs.webkit.org/show_bug.cgi?id=233857
+
+        Reviewed by Tim Horton.
+
+        Add start/end points for synthetic momentum, and a trace point for each generated event.
+
+        * Tracing/SystemTracePoints.plist:
+
 2021-12-04  Andres Gonzalez  <[email protected]>
 
         Change WTR::AccessibilityUIElement::descriptionOfValue(id) to return a RetainPtr.

Modified: trunk/Tools/Tracing/SystemTracePoints.plist (286536 => 286537)


--- trunk/Tools/Tracing/SystemTracePoints.plist	2021-12-05 04:14:50 UTC (rev 286536)
+++ trunk/Tools/Tracing/SystemTracePoints.plist	2021-12-06 04:40:19 UTC (rev 286537)
@@ -596,6 +596,48 @@
              </dict>
              <dict>
                  <key>Name</key>
+                 <string>Synthetic momentum</string>
+                 <key>Type</key>
+                 <string>Interval</string>
+                 <key>Component</key>
+                 <string>47</string>
+                 <key>CodeBegin</key>
+                 <string>12025</string>
+                 <key>CodeEnd</key>
+                 <string>12026</string>
+                 <key>ArgNamesEnd</key>
+                 <dict>
+                     <key>Arg1</key>
+                     <string>Initial Velocity X</string>
+                     <key>Arg2</key>
+                     <string>Initial Velocity Y</string>
+                 </dict>
+             </dict>
+             <dict>
+                 <key>Name</key>
+                 <string>Synthetic momentum event</string>
+                 <key>Type</key>
+                 <string>Level</string>
+                 <key>Component</key>
+                 <string>47</string>
+                 <key>Code</key>
+                 <string>12027</string>
+                 <key>ArgNames</key>
+                 <dict>
+                     <key>Arg1</key>
+                     <string>Phase</string>
+                     <key>Arg2</key>
+                     <string>Delta X</string>
+                     <key>Arg3</key>
+                     <string>Delta Y</string>
+                 </dict>
+                 <key>LevelArg</key>
+                 <string>Arg3</string>
+                 <key>LevelDataType</key>
+                 <string>UInt64</string>
+             </dict>
+             <dict>
+                 <key>Name</key>
                  <string>Commit RemoteLayerTree transaction</string>
                  <key>Type</key>
                  <string>Interval</string>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to