Title: [111391] trunk/Source/WebCore
- Revision
- 111391
- Author
- gav...@chromium.org
- Date
- 2012-03-20 07:31:17 -0700 (Tue, 20 Mar 2012)
Log Message
New PageCache histogram for tracking the highest leverage frame reject reasons.
https://bugs.webkit.org/show_bug.cgi?id=81358
Reviewed by Adam Barth.
The current chromium FrameClientImpl always denies page cache; but
that's easily fixable. This histogram tracks which rejection
causes occur alone with that cause. I'm particularly interested
in knowing how many more pages would work in the page cache if we
could get plugins in.
* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (111390 => 111391)
--- trunk/Source/WebCore/ChangeLog 2012-03-20 14:24:51 UTC (rev 111390)
+++ trunk/Source/WebCore/ChangeLog 2012-03-20 14:31:17 UTC (rev 111391)
@@ -1,3 +1,19 @@
+2012-03-20 Gavin Peters <gav...@chromium.org>
+
+ New PageCache histogram for tracking the highest leverage frame reject reasons.
+ https://bugs.webkit.org/show_bug.cgi?id=81358
+
+ Reviewed by Adam Barth.
+
+ The current chromium FrameClientImpl always denies page cache; but
+ that's easily fixable. This histogram tracks which rejection
+ causes occur alone with that cause. I'm particularly interested
+ in knowing how many more pages would work in the page cache if we
+ could get plugins in.
+
+ * history/PageCache.cpp:
+ (WebCore::logCanCachePageDecision):
+
2012-03-15 Pavel Podivilov <podivi...@chromium.org>
Web Inspector: support inline source maps.
Modified: trunk/Source/WebCore/history/PageCache.cpp (111390 => 111391)
--- trunk/Source/WebCore/history/PageCache.cpp 2012-03-20 14:24:51 UTC (rev 111390)
+++ trunk/Source/WebCore/history/PageCache.cpp 2012-03-20 14:31:17 UTC (rev 111391)
@@ -83,6 +83,22 @@
};
COMPILE_ASSERT(NumberOfReasonsFramesCannotBeInPageCache <= sizeof(unsigned)*8, ReasonFrameCannotBeInPageCacheDoesNotFitInBitmap);
+static int indexOfSingleBit(int32_t v)
+{
+ int index = 0;
+ if (v & 0xFFFF0000)
+ index = 16;
+ if (v & 0xFF00FF00)
+ index += 8;
+ if (v & 0xF0F0F0F0)
+ index += 4;
+ if (v & 0xCCCCCCCC)
+ index += 2;
+ if (v & 0xAAAAAAAA)
+ index += 1;
+ return index;
+}
+
static unsigned logCanCacheFrameDecision(Frame* frame, int indentLevel)
{
#ifdef NDEBUG
@@ -272,6 +288,20 @@
HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonByPage", i, NumberOfReasonsFramesCannotBeInPageCache);
}
}
+#if PLATFORM(CHROMIUM)
+ // This strangely specific histogram is particular to chromium: as of 2012-03-16, the FrameClientImpl always denies caching, so
+ // of particular interest are solitary reasons other than the frameRejectReasons. If we didn't get to the ClientDeniesCaching, we
+ // took the early exit for the boring reason NoDocumentLoader, so we should have only one reason, and not two.
+ // FIXME: remove this histogram after data is gathered.
+ if (frameReasonCount == 2) {
+ ASSERT(frameRejectReasons & (1 << ClientDeniesCaching));
+ const unsigned singleReasonForRejectingFrameOtherThanClientDeniesCaching = frameRejectReasons & ~(1 << ClientDeniesCaching);
+ COMPILE_ASSERT(NumberOfReasonsPagesCannotBeInPageCache <= 32, ReasonPageCannotBeInPageCacheDoesNotFitInInt32);
+ const int index = indexOfSingleBit(static_cast<int32_t>(singleReasonForRejectingFrameOtherThanClientDeniesCaching));
+ HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonByPageWhenSingleExcludingFrameClient", index, NumberOfReasonsPagesCannotBeInPageCache);
+ }
+#endif
+
HistogramSupport::histogramEnumeration("PageCache.FrameRejectReasonCountByPage", frameReasonCount, 1 + NumberOfReasonsFramesCannotBeInPageCache);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes