Title: [184210] trunk/Source
Revision
184210
Author
[email protected]
Date
2015-05-12 12:29:42 -0700 (Tue, 12 May 2015)

Log Message

[WK2] Log using diagnostic logging how far back in history we navigate
https://bugs.webkit.org/show_bug.cgi?id=144919
<rdar://problem/20920043>

Reviewed by Gavin Barraclough.

Source/WebCore:

Add diagnostic logging keys for logging back history navigation delta.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::deltaKey):
(WebCore::DiagnosticLoggingKeys::backNavigationKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log using diagnostic logging how far back in history we navigate.
When a back navigation or a backward indexed navigation occurs, we
log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::goToItem):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (184209 => 184210)


--- trunk/Source/WebCore/ChangeLog	2015-05-12 19:23:51 UTC (rev 184209)
+++ trunk/Source/WebCore/ChangeLog	2015-05-12 19:29:42 UTC (rev 184210)
@@ -1,3 +1,18 @@
+2015-05-12  Chris Dumez  <[email protected]>
+
+        [WK2] Log using diagnostic logging how far back in history we navigate
+        https://bugs.webkit.org/show_bug.cgi?id=144919
+        <rdar://problem/20920043>
+
+        Reviewed by Gavin Barraclough.
+
+        Add diagnostic logging keys for logging back history navigation delta.
+
+        * page/DiagnosticLoggingKeys.cpp:
+        (WebCore::DiagnosticLoggingKeys::deltaKey):
+        (WebCore::DiagnosticLoggingKeys::backNavigationKey):
+        * page/DiagnosticLoggingKeys.h:
+
 2015-05-12  Yoav Weiss  <[email protected]>
 
         Avoid CSSPrimitiveValue allocation when parsing sizes

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp (184209 => 184210)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2015-05-12 19:23:51 UTC (rev 184209)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp	2015-05-12 19:29:42 UTC (rev 184210)
@@ -263,6 +263,11 @@
     return ASCIILiteral("cannotSuspendActiveDOMObjects");
 }
 
+String DiagnosticLoggingKeys::deltaKey()
+{
+    return ASCIILiteral("delta");
+}
+
 String DiagnosticLoggingKeys::applicationCacheKey()
 {
     return ASCIILiteral("applicationCache");
@@ -273,6 +278,11 @@
     return ASCIILiteral("audio");
 }
 
+String DiagnosticLoggingKeys::backNavigationKey()
+{
+    return ASCIILiteral("backNavigation");
+}
+
 String DiagnosticLoggingKeys::cacheControlNoStoreKey()
 {
     return ASCIILiteral("cacheControlNoStore");

Modified: trunk/Source/WebCore/page/DiagnosticLoggingKeys.h (184209 => 184210)


--- trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2015-05-12 19:23:51 UTC (rev 184209)
+++ trunk/Source/WebCore/page/DiagnosticLoggingKeys.h	2015-05-12 19:29:42 UTC (rev 184210)
@@ -34,9 +34,11 @@
 public:
     static String applicationCacheKey();
     static String audioKey();
+    WEBCORE_EXPORT static String backNavigationKey();
     WEBCORE_EXPORT static String cacheControlNoStoreKey();
     static String cachedResourceRevalidationKey();
     static String cannotSuspendActiveDOMObjectsKey();
+    WEBCORE_EXPORT static String deltaKey();
     static String deniedByClientKey();
     static String deviceMotionKey();
     static String deviceOrientationKey();

Modified: trunk/Source/WebKit2/ChangeLog (184209 => 184210)


--- trunk/Source/WebKit2/ChangeLog	2015-05-12 19:23:51 UTC (rev 184209)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-12 19:29:42 UTC (rev 184210)
@@ -1,3 +1,18 @@
+2015-05-12  Chris Dumez  <[email protected]>
+
+        [WK2] Log using diagnostic logging how far back in history we navigate
+        https://bugs.webkit.org/show_bug.cgi?id=144919
+        <rdar://problem/20920043>
+
+        Reviewed by Gavin Barraclough.
+
+        Log using diagnostic logging how far back in history we navigate.
+        When a back navigation or a backward indexed navigation occurs, we
+        log the delta: (HistoryListSize - 1) - NewHistoryItemIndex.
+
+        * UIProcess/WebBackForwardList.cpp:
+        (WebKit::WebBackForwardList::goToItem):
+
 2015-05-11  Sam Weinig  <[email protected]>
 
         ChildProcess should take an os_activity

Modified: trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp (184209 => 184210)


--- trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp	2015-05-12 19:23:51 UTC (rev 184209)
+++ trunk/Source/WebKit2/UIProcess/WebBackForwardList.cpp	2015-05-12 19:29:42 UTC (rev 184210)
@@ -29,6 +29,7 @@
 #include "APIArray.h"
 #include "SessionState.h"
 #include "WebPageProxy.h"
+#include <WebCore/DiagnosticLoggingKeys.h>
 
 namespace WebKit {
 
@@ -175,6 +176,12 @@
     if (targetIndex == notFound)
         return;
 
+    if (targetIndex < m_currentIndex) {
+        unsigned delta = m_entries.size() - targetIndex - 1;
+        String deltaValue = delta > 10 ? ASCIILiteral("over10") : String::number(delta);
+        m_page->logDiagnosticMessageWithValue(WebCore::DiagnosticLoggingKeys::backNavigationKey(), WebCore::DiagnosticLoggingKeys::deltaKey(), deltaValue, false /* shouldSample */);
+    }
+
     // If we're going to an item different from the current item, ask the client if the current
     // item should remain in the list.
     WebBackForwardListItem* currentItem = m_entries[m_currentIndex].get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to